From e8533d91af361f9803442a3f58c44938e261baae Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 29 May 2021 23:06:31 +0300 Subject: [PATCH] Add an httpd:bullseye image. Same as the buster image, but bullseye. --- .gitlab-ci.yml | 16 ++++++++++++++++ httpd/bullseye/.dockerignore | 1 + httpd/bullseye/Dockerfile | 28 ++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 httpd/bullseye/.dockerignore create mode 100644 httpd/bullseye/Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f83587a..d56652a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,3 +87,19 @@ push-httpd-buster: needs: - job: build-httpd artifacts: true + +# httpd bullseye image: + +build-httpd-bullseye: + extends: .build + variables: + CONTEXT: httpd/bullseye + +push-httpd-bullseye: + extends: .push + variables: + IMAGE: httpd + TAG: bullseye + needs: + - job: build-httpd-bullseye + artifacts: true diff --git a/httpd/bullseye/.dockerignore b/httpd/bullseye/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/httpd/bullseye/.dockerignore @@ -0,0 +1 @@ +* diff --git a/httpd/bullseye/Dockerfile b/httpd/bullseye/Dockerfile new file mode 100644 index 0000000..7fc3077 --- /dev/null +++ b/httpd/bullseye/Dockerfile @@ -0,0 +1,28 @@ +FROM registry.hub.docker.com/library/debian:bullseye-slim +# 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 www-data -g www-data -m 755 /run/apache2 && \ + install -d -o www-data -g www-data -m 755 /var/log/apache2 && \ + ln -sf /dev/stdout /var/log/apache2/access.log && \ + ln -sf /dev/stderr /var/log/apache2/error.log && \ + ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log && \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* +ENV APACHE_RUN_DIR=/run/apache2 \ + APACHE_LOG_DIR=/var/log/apache2 \ + APACHE_RUN_USER=www-data \ + APACHE_RUN_GROUP=www-data \ + APACHE_PID_FILE=/run/apache2/apache2.pid +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 -- GitLab