-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 709 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (19 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:alpine AS builder
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/togomak ./cmd/togomak
FROM docker:cli AS docker
RUN apk add --no-cache git
COPY --from=builder /go/bin/togomak /usr/bin/togomak
ENTRYPOINT ["/usr/bin/togomak"]
FROM scratch AS tiny
COPY --from=builder /go/bin/togomak /usr/bin/togomak
ENTRYPOINT ["/usr/bin/togomak"]
FROM alpine as alpine
RUN apk add --no-cache git
COPY --from=builder /go/bin/togomak /usr/bin/togomak
ENTRYPOINT ["/usr/bin/togomak"]
FROM gcr.io/cloud-builders/docker AS docker-buster
COPY --from=builder /go/bin/togomak /usr/bin/togomak
ENTRYPOINT ["/usr/bin/togomak"]
FROM alpine as default