摘要: 概述 .dockerignore 文件的作用类似于 git 工程中的 .gitignore 。不同的是 .dockerignore 应用于 docker 镜像的构建,它存在于 docker 构建上下文的根目录,用来排除不需要上传到 docker服务端的文件或目录 docker 在构建镜像时首先从构建 阅读全文
posted @ 2022-05-28 17:35 未来可期_Durant 阅读(701) 评论(0) 推荐(0) 编辑
摘要: 镜像构建上下文(Context) 在 Dockerfile 文件所在目录执行: $ docker build -t nginx:v3 . Sending build context to Docker daemon 2.048 kB Step 1 : FROM nginx > e43d811ce2f 阅读全文
posted @ 2022-05-28 16:58 未来可期_Durant 阅读(84) 评论(0) 推荐(0) 编辑
摘要: dockerfile文件 #引用基础镜像 FROM alpine:latest #给镜像添加作者以及作者邮箱等元信息 LABEL "author"="yourName" LABEL "E-mail"="yourEmail" #更换国内的清华大学的aline系统镜像源 RUN echo "https: 阅读全文
posted @ 2022-05-28 16:14 未来可期_Durant 阅读(919) 评论(0) 推荐(0) 编辑