We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd0b82d commit 242194cCopy full SHA for 242194c
Dockerfile
@@ -1,16 +1,9 @@
1
############################
2
# STEP 1 build executable binary
3
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
+FROM golang:1.19 AS builder
8
WORKDIR $GOPATH/src/mypackage/myapp/
9
COPY . .
10
-# Fetch dependencies.
11
-# Using go get.
12
-RUN go get -d -v
13
-# Build the binary.
14
RUN GOOS=linux go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o /go/bin/kuber -v kuber.go
15
16
# STEP 2 build a small image
0 commit comments