13 lines
320 B
Docker
13 lines
320 B
Docker
FROM golang:1.24-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
COPY main.go ./
|
|
COPY web ./web
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /dns-orbit .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /dns-orbit /dns-orbit
|
|
EXPOSE 8080
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/dns-orbit"]
|