loki-build-image: Fix (#4034)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
pull/4033/head^2
Arve Knudsen 4 years ago committed by GitHub
parent 826fdfa3b9
commit 7b11de86c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      loki-build-image/Dockerfile

@ -37,6 +37,11 @@ RUN GO111MODULE=on go get github.com/drone/drone-cli/drone@1fad337d74ca0ecf42099
FROM golang:1.16.6 as faillint
RUN GO111MODULE=on go get github.com/fatih/faillint@v1.5.0
# Install ghr used to push binaries and template the release
# This collides with the version of go tools used in the base image, thus we install it in its own image and copy it over.
FROM golang:1.16.6 as ghr
RUN GO111MODULE=on go get github.com/tcnksm/ghr
FROM golang:1.16.6-buster
RUN apt-get update && \
apt-get install -qy \
@ -52,6 +57,7 @@ COPY --from=lychee /usr/bin/lychee /usr/bin/lychee
COPY --from=golangci /bin/golangci-lint /usr/local/bin
COPY --from=drone /go/bin/drone /usr/bin/drone
COPY --from=faillint /go/bin/faillint /usr/bin/faillint
COPY --from=ghr /go/bin/ghr /usr/bin/ghr
# Install some necessary dependencies.
# Forcing GO111MODULE=on is required to specify dependencies at specific versions using the go mod notation.
@ -66,8 +72,7 @@ RUN GO111MODULE=on go get \
# Due to the lack of a proper release tag, we use the commit hash of
# https://github.com/golang/tools/releases v0.1.7
golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69 \
github.com/mitchellh/gox \
github.com/tcnksm/ghr && \
github.com/mitchellh/gox && \
rm -rf /go/pkg /go/src
ENV GOCACHE=/go/cache

Loading…
Cancel
Save