Browse Source

correctly quote statements containing path variables

otherwise the path variable is expanded at docker build time instead of at runtime when running the container.

Changelog: Expand existing environment '$PATH' variable instead of replacing it

Signed-off-by: Simon Gamma <github@survive.ch>
1.2.x
Simon Gamma 6 years ago
parent
commit
596203f474
  1. 4
      Dockerfile

4
Dockerfile

@ -40,7 +40,7 @@ RUN echo "mtools_skip_check=1" >> $HOME/.mtoolsrc
RUN wget -nc -q https://toolchains.bootlin.com/downloads/releases/toolchains/armv6-eabihf/tarballs/armv6-eabihf--glibc--stable-2018.11-1.tar.bz2 \
&& tar -xjf armv6-eabihf--glibc--stable-2018.11-1.tar.bz2 \
&& rm armv6-eabihf--glibc--stable-2018.11-1.tar.bz2 \
&& echo export PATH=$PATH:/armv6-eabihf--glibc--stable-2018.11-1/bin >> /root/.bashrc
&& echo 'export PATH=$PATH:/armv6-eabihf--glibc--stable-2018.11-1/bin' >> /root/.bashrc
RUN wget -q -O /usr/bin/mender-artifact https://d1b0l86ne08fsf.cloudfront.net/mender-artifact/$MENDER_ARTIFACT_VERSION/mender-artifact \
&& chmod +x /usr/bin/mender-artifact
@ -48,7 +48,7 @@ RUN wget -q -O /usr/bin/mender-artifact https://d1b0l86ne08fsf.cloudfront.net/me
# Golang environment, for cross-compiling the Mender client
RUN wget https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz \
&& echo export PATH=$PATH:/usr/local/go/bin >> /root/.bashrc
&& echo 'export PATH=$PATH:/usr/local/go/bin' >> /root/.bashrc
ENV PATH "$PATH:/usr/local/go/bin:/armv6-eabihf--glibc--stable-2018.11-1/bin"
ENV GOPATH "/root/go"

Loading…
Cancel
Save