2022-10-27 21:19:23 +00:00
|
|
|
FROM golang:1.19-alpine AS build
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
RUN CGO_ENABLED=0 go build -o /app/local-ip
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/base-debian11
|
|
|
|
|
|
|
|
ENV PORT 53
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
COPY --from=build /app/local-ip /
|
2023-02-26 10:02:30 +00:00
|
|
|
COPY ./.lego /.lego
|
2022-10-27 21:19:23 +00:00
|
|
|
|
|
|
|
EXPOSE $PORT
|
|
|
|
USER root
|
|
|
|
|
|
|
|
CMD ["/local-ip"]
|