-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (14 loc) · 589 Bytes
/
Dockerfile
File metadata and controls
21 lines (14 loc) · 589 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM golang:1.22 AS build-env
WORKDIR /go/src/app
ADD . /go/src/app
RUN go get -d -v ./...
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -mod=vendor -buildvcs -o /go/bin/app
FROM gcr.io/distroless/static:latest
# https://github.com/GoogleContainerTools/distroless/tree/master/base
LABEL name="ip"
LABEL repository="https://github.com/chuhlomin/ip"
LABEL homepage="https://github.com/chuhlomin/ip"
LABEL maintainer="Constantine Chukhlomin <mail@chuhlomin.com>"
COPY --from=build-env /go/bin/app /bin/app
COPY favicon.ico og.png /
CMD ["/bin/app"]