Dockerfile 从远程仓库其他镜像中拷贝文件到指定容器

本人想通过Dockerfile构建新的镜像,实现从远程仓库其他镜像中拷贝文件到指定容器。 

Dockerfile

FROM harbor:80/library/busybox:latest
COPY --from=harbor:80/library/nginx:1.18 /bin/bash /tmp/bash-nginx
RUN ls -l /tmp

通过使用COPY的 --from= 参数指定远程harbor仓库的镜像路径 和 需要copy的文件名

随后指定最终地址

猜你喜欢

转载自blog.csdn.net/m0_59267075/article/details/128429698