Skip to content

Commit 242194c

Browse files
committed
update dockerfile
1 parent dd0b82d commit 242194c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
############################
22
# STEP 1 build executable binary
33
############################
4-
FROM golang:alpine AS builder
5-
# Install git.
6-
# Git is required for fetching the dependencies.
7-
RUN apk update && apk add --no-cache git
4+
FROM golang:1.19 AS builder
85
WORKDIR $GOPATH/src/mypackage/myapp/
96
COPY . .
10-
# Fetch dependencies.
11-
# Using go get.
12-
RUN go get -d -v
13-
# Build the binary.
147
RUN GOOS=linux go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o /go/bin/kuber -v kuber.go
158
############################
169
# STEP 2 build a small image

0 commit comments

Comments
 (0)