从Dockerfile构建docker镜像:无法启动容器

时间:2016-12-01 21:22:27

标签: docker dockerfile docker-build

我正在尝试使用现有的Dockerfile构建新映像。看起来它确实在某个时候从缓存中恢复了。但是构建并没有从apt安装/更新等非常简单的步骤发展出来。如何获得有关实际错误以及如何从该状态恢复的更多信息?非常感谢!

...
Step 15 : RUN apt-get install -y cron
 ---> Using cache
 ---> a2a6dea37a20
Step 16 : RUN apt-get install -y vim
 ---> Using cache
 ---> a2a5dea37a19
Step 17 : RUN apt-get install -y debsecan
 ---> Using cache
 ---> cc2aa4c994c2
Step 18 : RUN apt-get install -y links
 ---> Using cache
 ---> abb32d4543f6
Step 19 : RUN apt-get update
 ---> Running in 68c12197bcfd
Cannot start container 68c12197bcfd12f39e669dc4ba1f1dc07a6fde07c675b6e763...: [9] System error: exit status 1

docker version

Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.14.x86_64
 Go version:      go1.6.3
 Git commit:      8f9d39a-unsupported
 Built:           Thu Sep 15 11:51:19 2016
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.14.x86_64
 Go version:      go1.6.3
 Git commit:      8f9d39a-unsupported
 Built:           Thu Sep 15 11:51:19 2016
 OS/Arch:         linux/amd64



FROM debian:latest

MAINTAINER me@example.com

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get update
RUN apt-get install -y sudo
RUN apt-get install -y dialog
RUN apt-get install -y curl
RUN apt-get install -y wget
RUN apt-get install -y vim
RUN apt-get install -y net-tools
RUN apt-get install -y apt-utils
RUN apt-get install -y net-tools
RUN apt-get install -y cron
RUN apt-get install -y vim
RUN apt-get install -y debsecan
RUN apt-get install -y links
RUN apt-get update
RUN apt-get install -y apache2
RUN cd /var/www && mv html htmlapache
RUN mkdir -p /var/www/html/repo
RUN touch /var/www/html/index.html
COPY entrypoint.sh /
RUN apt-get -y install salt-master
CMD [ "/entrypoint.sh" ]
EXPOSE 8000

0 个答案:

没有答案