码迷,mamicode.com
首页 > 其他好文 > 详细

Images之Dockerfile中的命令2

时间:2018-07-10 20:05:40      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:ret   cto   form   build   and   images   rsh   hit   ids   

COPY

COPY has two forms:

  • COPY [--chown=<user>:<group>] <src>... <dest>
  • COPY [--chown=<user>:<group>] ["<src>",... "<dest>"] (this form is required for paths containing whitespace)

Note: The --chown feature is only supported on Dockerfiles used to build Linux containers, and will not work on Windows containers. Since user and group ownership concepts do not translate between Linux and Windows, the use of /etc/passwd and /etc/group for translating user and group names to IDs restricts this feature to only be viable for Linux OS-based containers.

The COPY instruction copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>.

Multiple <src> resources may be specified but the paths of files and directories will be interpreted as relative to the source of the context of the build.

Each <src> may contain wildcards and matching will be done using Go’s filepath.Match rules. For example:

Images之Dockerfile中的命令2

标签:ret   cto   form   build   and   images   rsh   hit   ids   

原文地址:https://www.cnblogs.com/panpanwelcome/p/9290912.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!