【发布时间】:2016-11-11 20:38:17
【问题描述】:
我正在尝试使用官方 docker-consul 图像阅读此文档https://hub.docker.com/_/consul/
不确定我是否可以从集线器中提取此官方图像,但我正在尝试从 dockerfile 和官方 repo 中的脚本构建图像
https://github.com/hashicorp/docker-consul
使用以下命令
docker build -t docker-consul:0.6 .
来自包含 Dockerfile 和 docker-entrypoint.sh 的文件夹
但是图像创建失败并出现以下错误
The command '/bin/sh -c apk add --no-cache ca-certificates gnupg && gpg --recv-keys 91A6E7F85D05C65630BEF18951852D87348FFC4C && mkdir -p /tmp/build && cd /tmp/build && wget
https://releases.hashicorp.com/docker-base/${DOCKER_BASE_VERSION}/docker-base_${DOCKER_BASE_VERSION}_linux_amd64.zip && wget
https://releases.hashicorp.com/docker-base/${DOCKER_BASE_VERSION}/docker-base_${DOCKER_BASE_VERSION}_SHA256SUMS && wget
https://releases.hashicorp.com/docker-base/${DOCKER_BASE_VERSION}/docker-base_${DOCKER_BASE_VERSION}_SHA256SUMS.sig && gpg --batch --verify docker-base_${DOCKER_BASE_VERSION}_SHA256SUMS.sig docker-base_${DOCKER_BASE_VERSION}_SHA256SUMS && grep ${DOCKER_BASE_VERSION}_linux_amd64.zip docker-base_${DOCKER_BASE_VERSION}_SHA256SUMS | sha256sum -c && unzip docker-base_${DOCKER_BASE_VERSION}_linux_amd64.zip && cp bin/gosu bin/dumb-init /bin && wget
https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip && wget
https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_SHA256SUMS && wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_SHA256SUMS.sig && gpg --batch --verify consul_${CONSUL_VERSION}_SHA256SUMS.sig consul_${CONSUL_VERSION}_SHA256SUMS && grep consul_${CONSUL_VERSION}_linux_amd64.zip consul_${CONSUL_VERSION}_SHA256SUMS | sha256sum -c && unzip -d /bin consul_${CONSUL_VERSION}_linux_amd64.zip && cd /tmp && rm -rf /tmp/build && apk del gnupg && rm -rf /root/.gnupg' returned a non-zero code: 2
我错过了什么?
我想修改入口点以包含运行时参数,以便它作为独立模式运行。然后仅使用 'docker run consul.
【问题讨论】:
-
你试过 docker 'docker pull consul' 吗?从 docker 文件构建的任何具体原因?
-
谢谢!!!我可能只是因为看不到图像名称而失明!
-
其实我确实有修改dockerfile的需求
-
我刚刚根据我的要求编辑了问题
标签: docker certificate consul