Skip to content

Commit

Permalink
Merge pull request #621 from kaitoy/improve-dockerfile
Browse files Browse the repository at this point in the history
Improve Dockerfile template such that copying vendor dir is cached.
  • Loading branch information
k8s-ci-robot committed Mar 6, 2019
2 parents 4228ca5 + 2d9f02a commit 67cfb94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/scaffold/manager/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ FROM golang:1.10.3 as builder
# Copy in the go src
WORKDIR /go/src/{{ .Repo }}
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/
COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager {{ .Repo }}/cmd/manager
Expand Down
2 changes: 1 addition & 1 deletion test/project/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM golang:1.10.3 as builder

# Copy in the go src
WORKDIR /go/src/sigs.k8s.io/kubebuilder/test/project
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/
COPY pkg/ pkg/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/kubebuilder/test/project/cmd/manager
Expand Down

0 comments on commit 67cfb94

Please sign in to comment.