2024-07-17 21:22:13 +00:00
|
|
|
FROM golang:1.22-alpine AS build
|
2022-10-27 21:19:23 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
RUN CGO_ENABLED=0 go build -o /app/local-ip
|
|
|
|
|
2023-12-12 21:25:39 +00:00
|
|
|
FROM gcr.io/distroless/base-debian12:latest
|
2022-10-27 21:19:23 +00:00
|
|
|
|
|
|
|
ENV PORT 53
|
|
|
|
|
2024-07-09 23:09:18 +00:00
|
|
|
WORKDIR /app
|
2022-10-27 21:19:23 +00:00
|
|
|
|
2024-07-09 23:09:18 +00:00
|
|
|
COPY --from=build /app/local-ip /app/local-ip
|
|
|
|
COPY --from=build /app/http/static /app/http/static
|
|
|
|
COPY ./.lego /app/.lego
|
2022-10-27 21:19:23 +00:00
|
|
|
|
|
|
|
EXPOSE $PORT
|
|
|
|
USER root
|
|
|
|
|
2024-07-09 23:09:18 +00:00
|
|
|
CMD ["/app/local-ip"]
|