栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Dockerfile复制保持子目录结构

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Dockerfile复制保持子目录结构

使用以下Dockerfile从COPY中删除星号:

FROM ubuntuCOPY files/ /files/RUN ls -la /files/*

结构在那里:

$ docker build .Sending build context to Docker daemon 5.632 kBSending build context to Docker daemon Step 0 : FROM ubuntu ---> d0955f21bf24Step 1 : COPY files/ /files/ ---> 5cc4ae8708a6Removing intermediate container c6f7f7ec8ccfStep 2 : RUN ls -la /files/* ---> Running in 08ab9a1e042f/files/folder1:total 8drwxr-xr-x 2 root root 4096 May 13 16:04 .drwxr-xr-x 4 root root 4096 May 13 16:05 ..-rw-r--r-- 1 root root    0 May 13 16:04 file1-rw-r--r-- 1 root root    0 May 13 16:04 file2/files/folder2:total 8drwxr-xr-x 2 root root 4096 May 13 16:04 .drwxr-xr-x 4 root root 4096 May 13 16:05 ..-rw-r--r-- 1 root root    0 May 13 16:04 file1-rw-r--r-- 1 root root    0 May 13 16:04 file2 ---> 03ff0a5d0e4bRemoving intermediate container 08ab9a1e042fSuccessfully built 03ff0a5d0e4b


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/426444.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号