summaryrefslogtreecommitdiff
path: root/docker-image
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-03 23:13:35 +0200
committerPaul Buetow <paul@buetow.org>2026-02-03 23:13:35 +0200
commit9c5d758de36299b4e6498539bb7561c193364897 (patch)
treeb12c06c4522168c6c3977554ad4b8ddd8b71290b /docker-image
parent7aaf44bd10d847420053fbef377468ef40fc1337 (diff)
fix registry
Diffstat (limited to 'docker-image')
-rw-r--r--docker-image/Dockerfile10
-rw-r--r--docker-image/Justfile4
2 files changed, 10 insertions, 4 deletions
diff --git a/docker-image/Dockerfile b/docker-image/Dockerfile
index 00a212b..a17d264 100644
--- a/docker-image/Dockerfile
+++ b/docker-image/Dockerfile
@@ -9,6 +9,7 @@ RUN apk update && apk add --no-cache \
RUN sed -i 's/#LoadModule cgid_module/LoadModule cgid_module/' /usr/local/apache2/conf/httpd.conf && \
sed -i 's/#LoadModule cgi_module/LoadModule cgi_module/' /usr/local/apache2/conf/httpd.conf && \
sed -i 's/#LoadModule remoteip_module/LoadModule remoteip_module/' /usr/local/apache2/conf/httpd.conf && \
+ sed -i 's/^Listen 80$/Listen 8080/' /usr/local/apache2/conf/httpd.conf && \
echo 'ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"' >> /usr/local/apache2/conf/httpd.conf && \
echo '<Directory "/usr/local/apache2/cgi-bin">' >> /usr/local/apache2/conf/httpd.conf && \
echo ' AllowOverride None' >> /usr/local/apache2/conf/httpd.conf && \
@@ -26,10 +27,15 @@ RUN sed -i 's/#LoadModule cgid_module/LoadModule cgid_module/' /usr/local/apache
COPY index.pl /usr/local/apache2/cgi-bin/index.pl
RUN chmod 755 /usr/local/apache2/cgi-bin/index.pl
+# Run as non-root
+RUN addgroup -S app && adduser -S -G app app && \
+ chown -R app:app /usr/local/apache2/logs /usr/local/apache2/htdocs /usr/local/apache2/cgi-bin /usr/local/apache2/conf
+USER app
+
# Create a redirect from / to /cgi-bin/index.pl
RUN echo '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="refresh" content="0; url=/cgi-bin/index.pl"><title>Redirecting...</title></head><body><p>Redirecting to <a href="/cgi-bin/index.pl">IPv6 Test</a>...</p></body></html>' > /usr/local/apache2/htdocs/index.html
-EXPOSE 80
+EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
- CMD wget -qO- http://127.0.0.1:80/ || exit 1
+ CMD wget -qO- http://127.0.0.1:8080/ || exit 1
diff --git a/docker-image/Justfile b/docker-image/Justfile
index 5a8b49b..f28bfdd 100644
--- a/docker-image/Justfile
+++ b/docker-image/Justfile
@@ -1,5 +1,5 @@
-VERSION := "1.6.0"
-REGISTRY := "registry.lan.buetow.org:30001"
+VERSION := "1.6.1"
+REGISTRY := "r0.lan.buetow.org:30001"
IMAGE := "ipv6test"
# Build the Docker image