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

Dockerfile ARG指令 | Go语言充电站 #103

Open
Shitaibin opened this issue Nov 10, 2020 · 0 comments
Open

Dockerfile ARG指令 | Go语言充电站 #103

Shitaibin opened this issue Nov 10, 2020 · 0 comments

Comments

@Shitaibin
Copy link
Owner

https://lessisbetter.site/2020/11/10/dockerfile-arg/

Docker的文档关于ARG和FROM指令配合使用做了详细说明: ARG用于传入外部参数,定义在FROM指令前,FROM后的其他指令无法使用ARG定义的环境变量,如果FROM指令后的指令要使用ARG定义的值,需要在FROM后再次定义。如果FROM不使用定义的ARG,可以直接定义到FROM后。 传递参数定义在FROM前123ARG UBUNTU_VERSION=16.04FROM ubuntu:$&

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

No branches or pull requests

1 participant