如何在Dockerfile中设置.bash_profile环境变量?
问题描述:
我想在Dockerfile中设置bash环境变量。
我该怎么做?如何在Dockerfile中设置.bash_profile环境变量?
主持人:OS X 10.11.4
游客:Ubuntu的:最新
Dockerfile:
RUN mkdir ~/gopath_dir
RUN apt-get install ubuntu-make
RUN umake go
# I want to set $GOPATH to ~/gopath_dir
答
可以声明一个环境变量与ENV声明
ENV foo=hello
+1
那么你就是这么做的,所以你需要解释发生了什么以及你想要发生什么。 –
你知道有官方golang图像? https://hub.docker.com/_/golang/ –