Custom nginx container exits immediately when part of docker-compose

后端 未结 4 1275
自闭症患者
自闭症患者 2021-01-30 17:34

I\'m trying to learn how to use docker compose with a simple setup of an nginx container that reroutes requests to a ghost container. I\'m using the standard ghost image but hav

4条回答
  •  终归单人心
    2021-01-30 18:16

    You can also add a

    tty: true
    

    to the service in your docker-compose.yml:

    webserver:
        build: .
        volumes:
            - "./src:/var/www/html"
        ports:
            - 8080:80
        depends_on:
            - aap-mysql
        tty: true
    

    and it should stay running after

    docker-compose up
    

提交回复
热议问题