-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
27 lines (19 loc) · 1.02 KB
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
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.21 as build-env
WORKDIR /go/src/app
ADD . /go/src/app
RUN go test -mod=vendor -cover ./...
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -mod=vendor -o /go/bin/app
FROM --platform=${TARGETPLATFORM:-linux/amd64} gcr.io/distroless/static:966f4bd97f611354c4ad829f1ed298df9386c2ec
# latest-amd64 -> 966f4bd97f611354c4ad829f1ed298df9386c2ec
# https://github.com/GoogleContainerTools/distroless/tree/master/base
LABEL name="envset"
LABEL repository="http://github.com/alsosee/envset"
LABEL homepage="http://github.com/alsosee/envset"
LABEL org.opencontainers.image.source https://github.com/alsosee/envset
LABEL maintainer="Konstantin Chukhlomin <mail@chuhlomin.com>"
LABEL com.github.actions.name="envset"
LABEL com.github.actions.description="This action sets an environment variable in GitHub Actions workflow"
LABEL com.github.actions.icon="chevrons-right"
LABEL com.github.actions.color="purple"
COPY --from=build-env /go/bin/app /app
CMD ["/app"]