aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Dockerfile11
-rw-r--r--Dockerfile_nginx7
2 files changed, 9 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile
index d41862a..20386f0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.17 as builder
+FROM alpine:3.21 as builder
ENV GOPROXY=https://goproxy.io
RUN apk update && apk upgrade
RUN apk add go git
@@ -8,13 +8,6 @@ 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="/CN=icanhazallips.terminaldweller.com" -keyout server.key -out server.cert
-
-# FROM gcr.io/distroless/static-debian11
-FROM alpine:3.17
-COPY --from=certbuilder /certs /certs
+FROM alpine:3.21
COPY --from=builder /icanhazallips/icanhazallips /icanhazallips/icanhazallips
ENTRYPOINT ["/icanhazallips/icanhazallips"]
diff --git a/Dockerfile_nginx b/Dockerfile_nginx
new file mode 100644
index 0000000..9ecb95b
--- /dev/null
+++ b/Dockerfile_nginx
@@ -0,0 +1,7 @@
+FROM alpine:3.21 as certbuilder
+RUN apk add openssl
+WORKDIR /certs
+RUN openssl req -nodes -new -x509 -subj="/CN=icanhazallips.terminaldweller.com" -keyout server.key -out server.cert
+
+FROM nginx:stable-alpine
+COPY --from=certbuilder /certs /certs