-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding
zip
to the build image (#1364)
Adding `drone` to the build image and updating the make target to run the drone command in the build image Re-adding `GO111MODULE=on` to the dependency import as it is still required and was removed in error. (Also updated the comment a little to reflect why it is still needed)
- Loading branch information
Showing
9 changed files
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,32 @@ RUN apk add --no-cache curl && \ | |
FROM alpine:edge as docker | ||
RUN apk add --no-cache docker-cli | ||
|
||
# TODO this should be fixed to download and extract the specific release binary from github as we do for golangci and helm above | ||
# however we need a commit which hasn't been released yet: https://github.com/drone/drone-cli/commit/1fad337d74ca0ecf420993d9d2d7229a1c99f054 | ||
# Read the comment below regarding GO111MODULE=on and why it is necessary | ||
FROM golang:1.13.4 as drone | ||
RUN GO111MODULE=on go get github.com/drone/drone-cli/drone@1fad337d74ca0ecf420993d9d2d7229a1c99f054 | ||
|
||
FROM golang:1.13.4-stretch | ||
RUN apt-get update && \ | ||
apt-get install -qy \ | ||
musl \ | ||
file unzip jq gettext\ | ||
file zip unzip jq gettext\ | ||
protobuf-compiler libprotobuf-dev \ | ||
libsystemd-dev && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
COPY --from=docker /usr/bin/docker /usr/bin/docker | ||
COPY --from=helm /usr/bin/helm /usr/bin/helm | ||
COPY --from=golangci /bin/golangci-lint /usr/local/bin | ||
COPY --from=drone /go/bin/drone /usr/bin/drone | ||
|
||
# Enable go 1.11 modules to be able to install pinned version of dependencies | ||
# even if we're installing them in the GOPATH | ||
RUN go get \ | ||
# Install some necessary dependencies. | ||
# Forcing GO111MODULE=on is required to specify dependencies at specific versions using the go mod notation. | ||
# If we don't force this, Go is going to default to GOPATH mode as we do not have an active project or go.mod | ||
# file for it to detect and switch to Go Modules automatically. | ||
# It's possible this can be revisited in newer versions of Go if the behavior around GOPATH vs GO111MODULES changes | ||
RUN GO111MODULE=on go get \ | ||
github.com/golang/protobuf/[email protected] \ | ||
github.com/gogo/protobuf/[email protected] \ | ||
github.com/gogo/protobuf/[email protected] \ | ||
|