docker - Docker 容器以代码 0 退出,没有错误详细信息
问题描述
我编写了以下 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
解决方案
推荐阅读
- javascript - 移动设备 (iOS) 上 iFrame 的大小问题
- spring-boot - 无法使用客户端中的 Spring Cloud Config 将 Hikari 属性外部化
- python - 使用列表推导而不是通常的 for 循环从重复成员中删除列表
- python - 如何不断地添加到一个字符串?
- r - 如何删除R中同一列中匹配的部分字符串?
- java - EJB3 MessageDrivenBean 抛出异常 当使用外部 ActiveMQ 队列时,此类不被信任序列化为 ObjectMessage 有效负载
- linux - 使用 tee 将输入管道输入到两个进程替换
- firefox - xfce4-terminal 打开新选项卡而不是新实例
- java - 如何使用 fastxml.jackson 验证 scala 中的嵌套案例类
- matlab - ode45 收敛到正确的曲线形状,但有错误的解决方案