Skip to content

Commit 0c58be6

Browse files
committed
Update Dockerfile to use golang:1.17
1 parent e452067 commit 0c58be6

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

01-Authorization-RS256/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
FROM golang:1.8-alpine3.6
1+
FROM golang:1.17-alpine3.14
22

3-
# install git
3+
# Install git
44
RUN apk --update add \
55
git openssl \
66
&& rm /var/cache/apk/*
77

8-
WORKDIR /go/src
8+
# Define current working directory
9+
WORKDIR /01-Authorization-RS256
910

10-
ADD . /go/src
11+
# Download modules to local cache so we can skip re-
12+
# downloading on consecutive docker build commands
13+
COPY go.mod .
14+
COPY go.sum .
15+
RUN go mod download
1116

12-
RUN go-wrapper download
13-
14-
CMD ["go", "run", "main.go"]
17+
# Add sources
18+
COPY . .
1519

20+
# Expose port 3010 for our api binary
1621
EXPOSE 3010
22+
23+
CMD ["go", "run", "main.go"]

0 commit comments

Comments
 (0)