Browse Source

Merge pull request #86 from simschla/bugfix/adaptions-for-dockerfile-robustness

Bugfix/adaptions for dockerfile robustness
1.2.x
lluiscampos 6 years ago
committed by GitHub
parent
commit
217b960441
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Dockerfile

9
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,13 +48,14 @@ 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"
# Download Mender client
ARG mender_client_version
RUN test -n "$mender_client_version" || (echo "Argument 'mender_client_version' is mandatory." && exit 1)
ENV MENDER_CLIENT_VERSION=$mender_client_version
RUN go get -d github.com/mendersoftware/mender
@ -81,6 +82,10 @@ RUN env CGO_ENABLED=1 \
GOOS=linux \
GOARM=6 GOARCH=arm make build
# allow us to keep original PATH variables when sudoing
RUN echo "Defaults secure_path=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:$PATH\"" > /etc/sudoers.d/secure_path_override
RUN chmod 0440 /etc/sudoers.d/secure_path_override
WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin/

Loading…
Cancel
Save