1

I have written the following docker-compose file to create 3 containers. Bugzilla container exits with code 0 after creation. Could you suggest what am I missing. It's not even showing any error, is there any way I look into exited containers log?

version: "3.2"
services:
  bugzilla:
    build: './bugzilla/'
    container_name: bugzilla
    networks:
      - bugzilla-network
    volumes:
      - ./bugzilla/:/var/www/html/
    depends_on:
      - mysql
    restart: on-failure
  apache:
    build: './apache/'
    container_name: bugzilla-apache
    depends_on:
      - bugzilla
      - mysql
    networks:
      - bugzilla-network
    ports:
      - "8080:80"
    volumes:
      - ./apache/:/var/www/html/
    restart: unless-stopped
  mysql:
    container_name: bugzilla-mysql
    env_file:
      - ./mysql/mysql.env
    networks:
      - bugzilla-network
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: unless-stopped

networks:
  bugzilla-network:
    driver: bridge

Here's my bugzilla Dockerfile.

FROM ubuntu:18.04

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -q -y supervisor gcc \
    apache2 mysql-client\
    libapache2-mod-perl2 libmysqlclient-dev libmath-random-isaac-perl \
    liblist-moreutils-perl libencode-detect-perl libdatetime-perl \
    msmtp msmtp-mta libnet-ssleay-perl libcrypt-ssleay-perl \
    libappconfig-perl libdate-calc-perl libtemplate-perl build-essential \
    libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl \
    libemail-mime-modifier-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl \
    libmath-random-isaac-perl libmath-random-isaac-xs-perl \
    libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl \
    libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl \
    libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl \
    libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl \
    libencode-detect-perl libmodule-build-perl libnet-ldap-perl libauthen-sasl-perl \
    libfile-mimeinfo-perl libhtml-formattext-withlinks-perl \
    libgd-dev graphviz python-sphinx patch && \
    rm -rf /var/lib/apt/lists/*

RUN cd /var/www/html && mkdir bugzilla
COPY . /var/www/html/bugzilla
WORKDIR /var/www/html/bugzilla
CMD perl ./checksetup.pl
ENTRYPOINT perl ./testserver.pl http://localhost/bugzilla
Saurabh
  • 63
  • 6
  • The default `WORKDIR` is in a directory that you've overwriting with a `volumes:` mount. If you delete the `volumes:`, does it start up? – David Maze Apr 09 '20 at 17:48
  • I just found this https://stackoverflow.com/questions/44884719/exited-with-code-0-docker/55907197 Maybe it can help you out! – Jill C May 26 '20 at 09:18

0 Answers0