diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ead83dfdf0b07ef83e1d76ceada6cc7e2cd79211..d666ad181ac8015851563a15f1465ae9144b106c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,19 +43,36 @@ push-cgit: build-httpd: extends: .container-build-base variables: - CONTEXT: httpd/bullseye + CONTEXT: httpd/bookworm push-httpd: extends: .container-push-base variables: - CONTEXT: httpd/bullseye + CONTEXT: httpd/bookworm IMAGE: httpd needs: - job: build-httpd artifacts: true +# httpd bookworm image: + +push-httpd-bookworm: + extends: .container-push-base + variables: + CONTEXT: httpd/bookworm + IMAGE: httpd + TAG: bookworm + needs: + - job: build-httpd + artifacts: true + # httpd bullseye image: +build-httpd-bullseye: + extends: .container-build-base + variables: + CONTEXT: httpd/bullseye + push-httpd-bullseye: extends: .container-push-base variables: @@ -63,7 +80,7 @@ push-httpd-bullseye: IMAGE: httpd TAG: bullseye needs: - - job: build-httpd + - job: build-httpd-bullseye artifacts: true # httpd buster image: diff --git a/httpd/bookworm/.dockerignore b/httpd/bookworm/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..72e8ffc0db8aad71a934dd11e5968bd5109e54b4 --- /dev/null +++ b/httpd/bookworm/.dockerignore @@ -0,0 +1 @@ +* diff --git a/httpd/bookworm/Dockerfile b/httpd/bookworm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b869f2bc2dc361c1ef158a92402c044388fc60a1 --- /dev/null +++ b/httpd/bookworm/Dockerfile @@ -0,0 +1,30 @@ +FROM registry.hub.docker.com/library/debian:bookworm-slim +ENV APACHE_RUN_DIR=/run/apache2 \ + APACHE_LOCK_DIR=/var/lock/apache2 \ + APACHE_LOG_DIR=/var/log/apache2 \ + APACHE_RUN_USER=www-data \ + APACHE_RUN_GROUP=www-data \ + APACHE_PID_FILE=/run/apache2/apache2.pid +# hadolint ignore=DL3008,DL3015 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + apache2 \ + libcap2-bin \ + wget \ + && \ + setcap CAP_NET_BIND_SERVICE=+ep /usr/sbin/apache2 && \ + DEBIAN_FRONTEND=noninteractive apt-get purge --auto-remove -y libcap2-bin && \ + a2enmod status && \ + install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_RUN_DIR" && \ + install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOCK_DIR" && \ + install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOG_DIR" && \ + ln -sf /dev/stdout "$APACHE_LOG_DIR/access.log" && \ + ln -sf /dev/stderr "$APACHE_LOG_DIR/error.log" && \ + ln -sf /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" && \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* +RUN apache2 -t +EXPOSE 80 +CMD [ "apache2", "-DFOREGROUND" ] +USER "www-data" +WORKDIR /var/www +HEALTHCHECK CMD wget --spider --quiet http://localhost/server-status --user-agent 'Healthcheck' || exit 1