-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (19 loc) · 806 Bytes
/
Dockerfile
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
FROM golang:alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w \
-X main.Version=v1.0.0 \
-X main.Release=production \
-X main.Sha=$GIT_SHA"
FROM scratch
COPY --from=builder /app/drain /drain
LABEL org.opencontainers.image.title "gadget"
LABEL org.opencontainers.image.description ""
LABEL org.opencontainers.image.authors "[email protected]"
LABEL org.opencontainers.image.source "github.com/wilhelm-murdoch/go-gadget"
LABEL org.opencontainers.image.url "github.com/wilhelm-murdoch/go-gadget"
LABEL org.opencontainers.image.docs "github.com/wilhelm-murdoch/go-gadget/blob/main/README.md"
LABEL org.opencontainers.image.version "${GIT_SHA}"
ENTRYPOINT ["gadget", "-h"]