我编写了以下docker-compose文件来创建3个容器。创建后,Bugzilla容器以代码0退出。你能建议我缺少什么吗?它甚至没有显示任何错误,有什么办法可以查看退出的容器日志吗?
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
这是我的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