Skip to content

Commit a1a0dbc

Browse files
committed
[+] updated Dockerfile to include 'go mod download' before building the main application
[*] modified build command to set CGO_ENABLED=0 for a statically linked binary
1 parent 51e08c8 commit a1a0dbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ WORKDIR /app
44

55
COPY . .
66

7-
RUN go build -o main apps/proxy/main.go
7+
RUN go mod download
8+
RUN CGO_ENABLED=0 go build -o main apps/proxy/main.go
89

910
FROM alpine:latest as runner
1011

0 commit comments

Comments
 (0)