search

Home  >  Q&A  >  body text

dockerfile - docker-compose fails to start lnmp?

Environment and software

lnmp portal on github

Alibaba Cloud ECS-Ubuntu 16.04.2 LTS

Linux iZ2zecxzfewu856w8sll6dZ 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Error description and screenshot

I found lnmp of docker-compose on github, but both php and mysql were started. Why can't nignx start?

After executing docker-compose up, it will always be the following section.

Use docker ps to see that php and mysql are running.

巴扎黑巴扎黑2709 days ago1672

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-06-29 10:11:01

    The error reported is a mysql error. It is recommended to use docker logs $container_id to view the nginx log, or you can post the compose.yml code when orchestrating the nginx service.

    You can also try an environment I compiled: https://github.com/zhaojunlik...

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-29 10:11:01

    The reason why lnmp startup failed for https://github.com/micooz/doc...

    Use docker logs to query the log and see that due to the certificate, the following two files need to be modified.

    docker-compose.yml
    Comment out the following two paragraphs.

        - ./nginx/ca/server.crt/:/etc/nginx/server.crt:ro
        - ./nginx/ca/server.key/:/etc/nginx/server.key:ro

    nginx/conf.d/default.conf
    Comment out the following two paragraphs.

        ssl_certificate      /etc/nginx/server.crt;
        ssl_certificate_key  /etc/nginx/server.key;

    Restart docker-compose up

    reply
    0
  • Cancelreply