local-ip.sh/Dockerfile

22 lines
288 B
Docker
Raw Normal View History

2023-12-12 21:25:39 +00:00
FROM golang:1.21-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
WORKDIR /
COPY --from=build /app/local-ip /
COPY ./.lego /.lego
2022-10-27 21:19:23 +00:00
EXPOSE $PORT
USER root
2023-12-12 21:25:39 +00:00
CMD ["/local-ip"]