local-ip.sh/Dockerfile

28 lines
422 B
Docker
Raw Normal View History

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
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"]