Skip to content

Commit ef17966

Browse files
committed
feat: enable go modules in Dockerfile and add .git into .dockerignore
1 parent 34ba17a commit ef17966

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
FROM golang:1.12 as build
1616
WORKDIR /go/src/github.com/programming-kubernetes/pizza-apiserver
1717
COPY . .
18-
RUN CGO_ENABLED=0 GOOS=linux go build .
18+
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build .
1919

2020
FROM alpine:latest
2121
RUN apk --no-cache add ca-certificates

0 commit comments

Comments
 (0)