gpt4 book ai didi

docker - 在多阶段构建中使用容器时,Docker 是否执行入口点?

转载 作者:行者123 更新时间:2023-12-02 17:59:24 26 4
gpt4 key购买 nike

如果定义多级 Dockerfile像这样:

FROM exampleabc:latest
COPY app.go .


FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/alexellis/href-counter/app .
CMD ["./app"]

请问 exampleabc:latest它的入口点执行了吗?

最佳答案

来自 official documentation :

Only the last ENTRYPOINT instruction in the Dockerfile will have an effect.

关于docker - 在多阶段构建中使用容器时,Docker 是否执行入口点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47292383/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com