Welcome! Log In Create A New Profile

Advanced

nginx exits error code 0 with docker compose

September 05, 2022 07:16PM
I'm trying to run nginx/mysql/php in docker. Everything seems to run
fine. I have added tty: true and changed the

Here is my Dockerfile, docker-compose.yaml and the nginx-related output.
I did try adding tty: true but it made no difference.

Any ideas? Thanks in advance.

biscotty

'''

FROM nginx:alpine

CMD ["nginx", "-g", "daemon off;"]

EXPOSE 80 443

'''

'''

version: '3'

services:
 php-fpm:
   build:
     context: ./php-fpm

 nginx:
   build:
     context: ./nginx
   volumes:
     - ../src:/var/www
   ports:
     - target: 80
       host_ip: 127.0.0.1
       published: 8080
       protocol: tcp
       mode: host

     - target: 80
       host_ip: 127.0.0.1
       published: 8000-9000
       protocol: tcp
       mode: host


 database:
   build:
     context: ./database
   environment:
     - MYSQL_DATABASE=containerphp
     - MYSQL_USER=container
     - MYSQL_PASSWORD=container
     - MYSQL_ROOT_PASSWORD=*******

'''

'''

docker-nginx-1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not
empty, will attempt to perform configuration
docker-nginx-1     | /docker-entrypoint.sh: Looking for shell scripts in
/docker-entrypoint.d/
docker-nginx-1     | /docker-entrypoint.sh: Launching
/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
docker-nginx-1     | 10-listen-on-ipv6-by-default.sh: info: Getting the
checksum of /etc/nginx/conf.d/default.conf
docker-nginx-1     | 10-listen-on-ipv6-by-default.sh: info: Enabled
listen on IPv6 in /etc/nginx/conf.d/default.conf
docker-nginx-1     | /docker-entrypoint.sh: Launching
/docker-entrypoint.d/20-envsubst-on-templates.sh
docker-nginx-1     | /docker-entrypoint.sh: Launching
/docker-entrypoint.d/30-tune-worker-processes.sh
docker-nginx-1     | /docker-entrypoint.sh: Configuration complete;
ready for start up
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 1#1: using the "epoll"
event method
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 1#1: nginx/1.23.1
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 1#1: built by gcc
11.2.1 20220219 (Alpine 11.2.1_git20220219)
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 1#1: OS: Linux
5.15.0-46-generic
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 1#1:
getrlimit(RLIMIT_NOFILE): 1048576:1048576
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 32#32: start worker
processes
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 32#32: start worker
process 33
docker-nginx-1     | 2022/09/05 22:55:51 [notice] 32#32: start worker
process 34
docker-nginx-1 exited with code 0

'''
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

nginx exits error code 0 with docker compose

biscotty September 05, 2022 07:16PM

Re: nginx exits error code 0 with docker compose

Konstantin Pavlov September 06, 2022 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 257
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready