Skip to content

Commit

Permalink
Changed checksum validation to use locally stored copy of checksum va…
Browse files Browse the repository at this point in the history
…lue. (#75)
  • Loading branch information
cybrcodr committed Mar 25, 2017
1 parent 596237b commit f7e3f61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtime-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ ARG debian_tag
ENV GO_VERSION ${go_version}
ENV DEBIAN_TAG ${debian_tag}

# Copy checksum for use in validation.
COPY checksums/go${GO_VERSION}.sha256 /tmp/

# Download SDK and validate.
RUN curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz -o /tmp/go.tar.gz && \
curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz.sha256 -o /tmp/go.tar.gz.sha256 && \
echo "$(cat /tmp/go.tar.gz.sha256) /tmp/go.tar.gz" | sha256sum -c - && \
echo "$(cat /tmp/go${GO_VERSION}.sha256) /tmp/go.tar.gz" | sha256sum -c - && \
tar -C /usr/local -xzf /tmp/go.tar.gz && \
rm /tmp/go.tar.gz /tmp/go.tar.gz.sha256
rm /tmp/go.tar.gz /tmp/go${GO_VERSION}.sha256

COPY go-build.sh /usr/local/bin/
COPY go-run.sh /usr/local/bin/
Expand Down
1 change: 1 addition & 0 deletions runtime-builder/checksums/go1.8.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca

0 comments on commit f7e3f61

Please sign in to comment.