Docker-Compose with multiple services

后端 未结 1 1213
误落风尘
误落风尘 2020-12-23 20:02

THIS IS A SAMPLE QUESTION! NEVER DO IT IN PRODUCTION. RUN NGINX / PHP / OTHER SERVICES IN SEPARATE CONTAINERS!

When I start docker-compose up the Ubuntu

1条回答
  •  -上瘾入骨i
    2020-12-23 20:47

    The thing is that you are using the option -t when running your container.

    Could you check if enabling the tty option (see reference) in your docker-compose.yml file the container keeps running?

    version: '2'
    services:
      ubuntu:
            build: .
            container_name: ubuntu
            volumes:
                - ~/sph/laravel52:/www/laravel
            ports:
              - "80:80"
            tty: true
    

    0 讨论(0)
提交回复
热议问题