This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 238
switch to using go modules #315
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bf8df91
switch to using vgo
nirnanaaa 5bafb1f
update vendor dependencies
nirnanaaa 0fabdd7
add go modules to drone
nirnanaaa 7aaf6be
change environment variable syntax
nirnanaaa 2cf153c
add environment variable to benchmark
nirnanaaa 2d72bf8
add git as build dependency
nirnanaaa 76e560c
change dockerfile logic
nirnanaaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
FROM golang:1.12-alpine3.10 as build | ||
RUN apk add --no-cache make | ||
WORKDIR /go/src/github.com/uswitch/kiam | ||
ADD . . | ||
FROM golang:1.12.5 as build | ||
ENV GO111MODULE=on | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
COPY cmd/ cmd/ | ||
COPY pkg/ pkg/ | ||
COPY proto/ proto/ | ||
COPY Makefile Makefile | ||
|
||
RUN make bin/kiam-linux-amd64 | ||
|
||
FROM alpine:3.8 | ||
RUN apk --no-cache add iptables | ||
COPY --from=build /go/src/github.com/uswitch/kiam/bin/kiam-linux-amd64 /kiam | ||
COPY --from=build /workspace/bin/kiam-linux-amd64 /kiam | ||
CMD [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go build
takes care of downloading the dependencies, we don't needgo mod download
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring mostly to what kubebuilder does in caching docker layers: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v2/Dockerfile#L8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, TFS