From f3c36dad4ec3e17042741d475848bca913e48f3c Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Tue, 17 Jan 2023 15:35:39 +0330 Subject: first commit --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fdd725a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM alpine:3.17 as builder +ENV GOPROXY=https://goproxy.io +RUN apk update && apk upgrade +RUN apk add go git +ENV GOPROXY=https://goproxy.io +COPY go.* /icanhazallips/ +RUN cd /icanhazallips && go mod download +COPY *.go /icanhazallips/ +RUN cd /icanhazallips && go build + +FROM alpine:3.17 as certbuilder +RUN apk add openssl +WORKDIR /certs +RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert + +FROM gcr.io/distroless/static-debian11 +# FROM alpine:3.17 +COPY --from=certbuilder /certs /certs +COPY --from=builder /icanhazallips/icanhazallips /icanhazallips/icanhazallips +ENTRYPOINT ["/icanhazallips/icanhazallips"] -- cgit v1.2.3