Skip to content

Commit

Permalink
add consul checksum for download verification
Browse files Browse the repository at this point in the history
  • Loading branch information
teutat3s committed Feb 3, 2020
1 parent 6a943ab commit bfccf2b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ ENV CONSUL_VERSION=1.6.3

RUN apt-get update \
&& apt-get install -y unzip \
&& go get golang.org/x/lint/golint \
&& curl --fail -Lso consul.zip "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" \
&& unzip consul.zip -d /usr/bin
&& go get golang.org/x/lint/golint

RUN export CONSUL_CHECKSUM=3ada92a7b49c11076d0a2db9db4ad53ee366fcfb0e057118a322ad0daf188c60 \
&& export archive=consul_${CONSUL_VERSION}_linux_amd64.zip \
&& curl -Lso /tmp/${archive} https://releases.hashicorp.com/consul/${CONSUL_VERSION}/${archive} \
&& echo "${CONSUL_CHECKSUM} /tmp/${archive}" | sha256sum -c \
&& cd /bin \
&& unzip /tmp/${archive} \
&& chmod +x /bin/consul \
&& rm /tmp/${archive}

ENV CGO_ENABLED 0
ENV GOPATH /go:/cp

0 comments on commit bfccf2b

Please sign in to comment.