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
|
2024-07-20 01:18:49 +00:00
|
|
|
RUN go build -o /app/local-ip
|
2022-10-27 21:19:23 +00:00
|
|
|
|
2023-12-12 21:25:39 +00:00
|
|
|
FROM gcr.io/distroless/base-debian12:latest
|
2022-10-27 21:19:23 +00:00
|
|
|
|
2024-07-20 00:43:52 +00:00
|
|
|
WORKDIR /local-ip
|
2022-10-27 21:19:23 +00:00
|
|
|
|
2024-07-20 00:43:52 +00:00
|
|
|
COPY --from=build /app/local-ip /local-ip/local-ip
|
|
|
|
COPY --from=build /app/http/static /local-ip/http/static
|
|
|
|
|
|
|
|
VOLUME /local-ip/.lego
|
2022-10-27 21:19:23 +00:00
|
|
|
|
2024-07-20 00:43:52 +00:00
|
|
|
# DNS
|
|
|
|
EXPOSE 53/udp
|
|
|
|
# HTTP
|
|
|
|
EXPOSE 80/tcp
|
|
|
|
# HTTPS
|
|
|
|
EXPOSE 443/tcp
|
2022-10-27 21:19:23 +00:00
|
|
|
|
|
|
|
USER root
|
|
|
|
|
2024-07-20 00:43:52 +00:00
|
|
|
CMD ["/local-ip/local-ip"]
|