Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker ADD与COPY的区别 #34

Open
AwesomeYuer opened this issue Sep 8, 2020 · 0 comments
Open

Docker ADD与COPY的区别 #34

AwesomeYuer opened this issue Sep 8, 2020 · 0 comments

Comments

@AwesomeYuer
Copy link
Owner

两个命令都差不多,它们的语法都是COPY|ADD 。

但是ADD比COPY功能要丰富一些:

ADD允许是一个URL。
如果是一个常见的压缩格式,如tar.gz。那么它会被解压。
一般常用COPY。例如要复制xxx.tar.gz到容器,如果被解压可能会出乎你的意料。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant