From 257e172d8b348ef7a2e8c93ba0d6792cea00977d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 21 Oct 2026 14:49:29 +0200 Subject: [PATCH] Drop Debian Bullseye variants Debian 11 LTS ended on 2026-08-31 and its security packages now 404 on deb.debian.org, so every bullseye build fails. Node 16 and 18 (EOL) had no trixie variant and are dropped with it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/workflow.yml | 24 --- Dockerfile.16-apache-bullseye | 225 --------------------------- Dockerfile.16-apache-bullseye-build | 229 --------------------------- Dockerfile.16-bullseye | 133 ---------------- Dockerfile.16-bullseye-build | 137 ----------------- Dockerfile.18-apache-bullseye | 225 --------------------------- Dockerfile.18-apache-bullseye-build | 229 --------------------------- Dockerfile.18-bullseye | 133 ---------------- Dockerfile.18-bullseye-build | 137 ----------------- Dockerfile.20-apache-bullseye | 225 --------------------------- Dockerfile.20-apache-bullseye-build | 229 --------------------------- Dockerfile.20-bullseye | 133 ---------------- Dockerfile.20-bullseye-build | 137 ----------------- Dockerfile.22-apache-bullseye | 225 --------------------------- Dockerfile.22-apache-bullseye-build | 229 --------------------------- Dockerfile.22-bullseye | 133 ---------------- Dockerfile.22-bullseye-build | 137 ----------------- Dockerfile.24-apache-bullseye | 225 --------------------------- Dockerfile.24-apache-bullseye-build | 229 --------------------------- Dockerfile.24-bullseye | 133 ---------------- Dockerfile.24-bullseye-build | 137 ----------------- Dockerfile.26-apache-bullseye | 226 --------------------------- Dockerfile.26-apache-bullseye-build | 230 ---------------------------- Dockerfile.26-bullseye | 134 ---------------- Dockerfile.26-bullseye-build | 138 ----------------- Makefile | 13 +- README.md | 42 ++--- orbit.yml | 24 --- 28 files changed, 14 insertions(+), 4437 deletions(-) delete mode 100644 Dockerfile.16-apache-bullseye delete mode 100644 Dockerfile.16-apache-bullseye-build delete mode 100644 Dockerfile.16-bullseye delete mode 100644 Dockerfile.16-bullseye-build delete mode 100644 Dockerfile.18-apache-bullseye delete mode 100644 Dockerfile.18-apache-bullseye-build delete mode 100644 Dockerfile.18-bullseye delete mode 100644 Dockerfile.18-bullseye-build delete mode 100644 Dockerfile.20-apache-bullseye delete mode 100644 Dockerfile.20-apache-bullseye-build delete mode 100644 Dockerfile.20-bullseye delete mode 100644 Dockerfile.20-bullseye-build delete mode 100644 Dockerfile.22-apache-bullseye delete mode 100644 Dockerfile.22-apache-bullseye-build delete mode 100644 Dockerfile.22-bullseye delete mode 100644 Dockerfile.22-bullseye-build delete mode 100644 Dockerfile.24-apache-bullseye delete mode 100644 Dockerfile.24-apache-bullseye-build delete mode 100644 Dockerfile.24-bullseye delete mode 100644 Dockerfile.24-bullseye-build delete mode 100644 Dockerfile.26-apache-bullseye delete mode 100644 Dockerfile.26-apache-bullseye-build delete mode 100644 Dockerfile.26-bullseye delete mode 100644 Dockerfile.26-bullseye-build diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9708ae8..92fac0d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,30 +16,6 @@ jobs: fail-fast: false matrix: include: - - variant: '16-bullseye' - - variant: '18-bullseye' - - variant: '20-bullseye' - - variant: '22-bullseye' - - variant: '24-bullseye' - - variant: '26-bullseye' - - variant: '16-apache-bullseye' - - variant: '18-apache-bullseye' - - variant: '20-apache-bullseye' - - variant: '22-apache-bullseye' - - variant: '24-apache-bullseye' - - variant: '26-apache-bullseye' - - variant: '16-bullseye-build' - - variant: '18-bullseye-build' - - variant: '20-bullseye-build' - - variant: '22-bullseye-build' - - variant: '24-bullseye-build' - - variant: '26-bullseye-build' - - variant: '16-apache-bullseye-build' - - variant: '18-apache-bullseye-build' - - variant: '20-apache-bullseye-build' - - variant: '22-apache-bullseye-build' - - variant: '24-apache-bullseye-build' - - variant: '26-apache-bullseye-build' - variant: '20-trixie' - variant: '22-trixie' - variant: '24-trixie' diff --git a/Dockerfile.16-apache-bullseye b/Dockerfile.16-apache-bullseye deleted file mode 100644 index ecc2a6e..0000000 --- a/Dockerfile.16-apache-bullseye +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=16.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.16-apache-bullseye-build b/Dockerfile.16-apache-bullseye-build deleted file mode 100644 index 3c26f65..0000000 --- a/Dockerfile.16-apache-bullseye-build +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=16.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.16-bullseye b/Dockerfile.16-bullseye deleted file mode 100644 index efa512f..0000000 --- a/Dockerfile.16-bullseye +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=16.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.16-bullseye-build b/Dockerfile.16-bullseye-build deleted file mode 100644 index 6d4d6a2..0000000 --- a/Dockerfile.16-bullseye-build +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=16.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.18-apache-bullseye b/Dockerfile.18-apache-bullseye deleted file mode 100644 index db84c96..0000000 --- a/Dockerfile.18-apache-bullseye +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=18.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.18-apache-bullseye-build b/Dockerfile.18-apache-bullseye-build deleted file mode 100644 index de0c440..0000000 --- a/Dockerfile.18-apache-bullseye-build +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=18.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.18-bullseye b/Dockerfile.18-bullseye deleted file mode 100644 index e5cbee9..0000000 --- a/Dockerfile.18-bullseye +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=18.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.18-bullseye-build b/Dockerfile.18-bullseye-build deleted file mode 100644 index ef930ab..0000000 --- a/Dockerfile.18-bullseye-build +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=18.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.20-apache-bullseye b/Dockerfile.20-apache-bullseye deleted file mode 100644 index ae93461..0000000 --- a/Dockerfile.20-apache-bullseye +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=20.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.20-apache-bullseye-build b/Dockerfile.20-apache-bullseye-build deleted file mode 100644 index 16e97bc..0000000 --- a/Dockerfile.20-apache-bullseye-build +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=20.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.20-bullseye b/Dockerfile.20-bullseye deleted file mode 100644 index 4afa54b..0000000 --- a/Dockerfile.20-bullseye +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=20.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.20-bullseye-build b/Dockerfile.20-bullseye-build deleted file mode 100644 index a408455..0000000 --- a/Dockerfile.20-bullseye-build +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=20.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.22-apache-bullseye b/Dockerfile.22-apache-bullseye deleted file mode 100644 index f2ef0de..0000000 --- a/Dockerfile.22-apache-bullseye +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=22.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.22-apache-bullseye-build b/Dockerfile.22-apache-bullseye-build deleted file mode 100644 index b9c04ae..0000000 --- a/Dockerfile.22-apache-bullseye-build +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=22.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.22-bullseye b/Dockerfile.22-bullseye deleted file mode 100644 index 89a53d0..0000000 --- a/Dockerfile.22-bullseye +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=22.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.22-bullseye-build b/Dockerfile.22-bullseye-build deleted file mode 100644 index 5d3d070..0000000 --- a/Dockerfile.22-bullseye-build +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=22.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.24-apache-bullseye b/Dockerfile.24-apache-bullseye deleted file mode 100644 index fc211a9..0000000 --- a/Dockerfile.24-apache-bullseye +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=24.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.24-apache-bullseye-build b/Dockerfile.24-apache-bullseye-build deleted file mode 100644 index d7fe2b7..0000000 --- a/Dockerfile.24-apache-bullseye-build +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=24.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.24-bullseye b/Dockerfile.24-bullseye deleted file mode 100644 index 9c08773..0000000 --- a/Dockerfile.24-bullseye +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=24.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.24-bullseye-build b/Dockerfile.24-bullseye-build deleted file mode 100644 index a82d9a8..0000000 --- a/Dockerfile.24-bullseye-build +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=24.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.26-apache-bullseye b/Dockerfile.26-apache-bullseye deleted file mode 100644 index 96e9f5d..0000000 --- a/Dockerfile.26-apache-bullseye +++ /dev/null @@ -1,226 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs && \ - npm install -g corepack@latest - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=26.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.26-apache-bullseye-build b/Dockerfile.26-apache-bullseye-build deleted file mode 100644 index acd3734..0000000 --- a/Dockerfile.26-apache-bullseye-build +++ /dev/null @@ -1,230 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - -# |-------------------------------------------------------------------------- -# | Apache -# |-------------------------------------------------------------------------- -# | -# | Installs Apache. -# | - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - apache2 \ - && rm -rf /var/lib/apt/lists/* - -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars - -RUN set -ex \ - \ -# generically convert lines like -# export APACHE_RUN_USER=www-data -# into -# : ${APACHE_RUN_USER:=www-data} -# export APACHE_RUN_USER -# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") - && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \ - \ -# setup directories and permissions - && . "$APACHE_ENVVARS" \ - && for dir in \ - "$APACHE_LOCK_DIR" \ - "$APACHE_RUN_DIR" \ - "$APACHE_LOG_DIR" \ - /var/www/html \ - ; do \ - rm -rvf "$dir" \ - && mkdir -p "$dir" \ - && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \ - done - -# logs should go to stdout / stderr -RUN set -ex \ - && . "$APACHE_ENVVARS" \ - && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ - && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" - -ENV APACHE_DOCUMENT_ROOT / - -RUN { \ - echo 'DirectoryIndex disabled'; \ - echo 'DirectoryIndex index.html'; \ - echo; \ - echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ - echo ''; \ - } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ - && a2enconf nodejs - -RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -# |-------------------------------------------------------------------------- -# | Apache mod_rewrite -# |-------------------------------------------------------------------------- -# | -# | Enables Apache mod_rewrite. -# | - -RUN a2enmod rewrite - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs && \ - npm install -g corepack@latest - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=26.x - - -RUN mkdir -p /var/www/html && chown docker:docker /var/www/html -WORKDIR /var/www/html - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -COPY utils/enable_apache_mods.js /usr/local/bin/enable_apache_mods.js -COPY utils/apache-expose-envvars.sh /usr/local/bin/apache-expose-envvars.sh - -# Let's register a servername to remove the message "apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message" -RUN echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf -RUN a2enconf servername - -EXPOSE 80 - -# |-------------------------------------------------------------------------- -# | Apache user -# |-------------------------------------------------------------------------- -# | -# | Defines Apache user. By default, we switch this to "docker" user. -# | This way, no problem to write from Apache in the current working directory. -# | Important! This should be changed back to www-data in production. -# | - -ENV APACHE_RUN_USER=docker \ - APACHE_RUN_GROUP=docker - -COPY utils/apache2-foreground /usr/local/bin/ -CMD ["apache2-foreground"] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.26-bullseye b/Dockerfile.26-bullseye deleted file mode 100644 index fe8d688..0000000 --- a/Dockerfile.26-bullseye +++ /dev/null @@ -1,134 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs && \ - npm install -g corepack@latest - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=26.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Dockerfile.26-bullseye-build b/Dockerfile.26-bullseye-build deleted file mode 100644 index fcef6be..0000000 --- a/Dockerfile.26-bullseye-build +++ /dev/null @@ -1,138 +0,0 @@ -# DO NOT EDIT THIS FILE : Make your changes in /utils/Dockerfile.blueprint) -FROM debian:bullseye-slim - -LABEL authors="Julien Neuhart , David Négrier " - -# |-------------------------------------------------------------------------- -# | Required libraries -# |-------------------------------------------------------------------------- -# | -# | Installs required libraries. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends curl git nano sudo ca-certificates procps libfontconfig tini --no-install-recommends - -# |-------------------------------------------------------------------------- -# | Supercronic -# |-------------------------------------------------------------------------- -# | -# | Supercronic is a drop-in replacement for cron (for containers). -# | - -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic - - # |-------------------------------------------------------------------------- - # | User - # |-------------------------------------------------------------------------- - # | - # | Define a default user with sudo rights. - # | - - RUN useradd -ms /bin/bash docker && usermod -a -G sudo docker - # Users in the sudoers group can sudo as root without password. - RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - - - - -# |-------------------------------------------------------------------------- -# | NodeJS -# |-------------------------------------------------------------------------- -# | -# | Installs NodeJS and npm. -# | - -RUN apt-get update &&\ - apt-get install -y --no-install-recommends gnupg &&\ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs && \ - npm install -g corepack@latest - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN corepack enable && corepack prepare yarn@stable --activate - -# |-------------------------------------------------------------------------- -# | PATH updating -# |-------------------------------------------------------------------------- -# | -# | Let's add ./node_modules/.bin to the PATH (utility function to use NPM bin easily) -# | - -ENV PATH="$PATH:./node_modules/.bin" -RUN sed -i 's#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin#/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:./node_modules/.bin#g' /etc/sudoers - -USER docker -# |-------------------------------------------------------------------------- -# | SSH client -# |-------------------------------------------------------------------------- -# | -# | Let's set-up the SSH client (for connections to private git repositories) -# | We create an empty known_host file and we launch the ssh-agent -# | - -RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts && eval $(ssh-agent -s) - -# |-------------------------------------------------------------------------- -# | .bashrc updating -# |-------------------------------------------------------------------------- -# | -# | Let's update the .bashrc to add nice aliases -# | -RUN { \ - echo "alias ls='ls --color=auto'"; \ - echo "alias ll='ls --color=auto -alF'"; \ - echo "alias la='ls --color=auto -A'"; \ - echo "alias l='ls --color=auto -CF'"; \ - } >> ~/.bashrc - -USER root - -# |-------------------------------------------------------------------------- -# | Entrypoint -# |-------------------------------------------------------------------------- -# | -# | Defines the entrypoint. -# | - -ENV NODE_VERSION=26.x - - -RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app -WORKDIR /usr/src/app - - -COPY utils/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -COPY utils/docker-entrypoint-as-root.sh /usr/local/bin/docker-entrypoint-as-root.sh -COPY utils/startup_commands.js /usr/local/bin/startup_commands.js -COPY utils/generate_cron.js /usr/local/bin/generate_cron.js - - - -CMD [ "node" ] - - - -# Let's install the build tools (useful for node-gyp) -RUN apt-get update &&\ - apt-get install -y --no-install-recommends build-essential - - -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] - - -USER docker diff --git a/Makefile b/Makefile index 23f6367..e279932 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,14 @@ blueprint: ## Generate all blueprints file @if ! type orbit >/dev/null 2>&1; then echo "Missing orbit dependency, please install from https://github.com/gulien/orbit/"; exit 1; fi orbit run generate -test-latest: test-20 ## Test the latest build only +test-latest: test-26 ## Test the latest build only -test-14: ## Test node 14 build only -test-16: ## Test node 16 build only -test-18: ## Test node 18 build only test-20: ## Test node 20 build only test-%: blueprint ## Test node X build - BRANCH=master VARIANT=$(*)-bullseye TAG=v2-$(*)-bullseye ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) - BRANCH=master VARIANT=$(*)-bullseye-build TAG=v2-$(*)-bullseye-build ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) - BRANCH=master VARIANT=$(*)-apache-bullseye TAG=v2-$(*)-apache-bullseye ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) - BRANCH=master VARIANT=$(*)-apache-bullseye-build TAG=v2-$(*)-apache-bullseye-build ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + BRANCH=master VARIANT=$(*)-trixie TAG=v2-$(*)-trixie ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + BRANCH=master VARIANT=$(*)-trixie-build TAG=v2-$(*)-trixie-build ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + BRANCH=master VARIANT=$(*)-apache-trixie TAG=v2-$(*)-apache-trixie ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + BRANCH=master VARIANT=$(*)-apache-trixie-build TAG=v2-$(*)-apache-trixie-build ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) notify-send -u critical "Tests passed with success for $*" clean: ## Clean dangles image after build diff --git a/README.md b/README.md index 7451a3d..ab82315 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This repository contains a set of **fat**, developer-friendly, general purpose NodeJS images for Docker. - - 2 distributions available: Debian `bullseye` and Debian `trixie` + - Based on Debian `trixie` (`bullseye` images are no longer built: Debian 11 reached end of life) - 2 variants available: `standalone` and `apache` (for serving an SPA without NodeJS server as backend) - For each variant, you can select the `build` sub-variant that contains essential build tools (make, gcc, etc.) that can be needed to compile native extensions - Images are bundled with cron. Cron jobs can be configured using environment variables @@ -30,30 +30,6 @@ This repository contains a set of **fat**, developer-friendly, general purpose N | [thecodingmachine/nodejs:v2-22-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-trixie-build)
[ghcr.io/thecodingmachine/nodejs:v2-22-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-trixie-build) | `22.x` | apache | Yes | Debian Trixie | | [thecodingmachine/nodejs:v2-24-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-trixie-build)
[ghcr.io/thecodingmachine/nodejs:v2-24-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-trixie-build) | `24.x` | apache | Yes | Debian Trixie | | [thecodingmachine/nodejs:v2-26-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-trixie-build)
[ghcr.io/thecodingmachine/nodejs:v2-26-apache-trixie-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-trixie-build) | `26.x` | apache | Yes | Debian Trixie | -| [thecodingmachine/nodejs:v2-16-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-16-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-bullseye) | `16.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-18-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-18-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-bullseye) | `18.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-20-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-20-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-bullseye) | `20.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-22-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-22-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-bullseye) | `22.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-24-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-24-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-bullseye) | `24.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-26-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-26-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-bullseye) | `26.x` | standalone | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-16-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-16-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-bullseye-build) | `16.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-18-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-18-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-bullseye-build) | `18.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-20-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-20-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-bullseye-build) | `20.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-22-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-22-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-bullseye-build) | `22.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-24-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-24-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-bullseye-build) | `24.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-26-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-26-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-bullseye-build) | `26.x` | standalone | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-16-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-16-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-apache-bullseye) | `16.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-18-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-18-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-apache-bullseye) | `18.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-20-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-20-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-apache-bullseye) | `20.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-22-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-22-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-bullseye) | `22.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-24-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-24-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-bullseye) | `24.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-26-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-bullseye)
[ghcr.io/thecodingmachine/nodejs:v2-26-apache-bullseye](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-bullseye) | `26.x` | apache | No | Debian Bullseye | -| [thecodingmachine/nodejs:v2-16-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-16-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.16-apache-bullseye-build) | `16.x` | apache | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-18-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-18-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.18-apache-bullseye-build) | `18.x` | apache | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-20-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-20-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.20-apache-bullseye-build) | `20.x` | apache | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-22-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-22-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.22-apache-bullseye-build) | `22.x` | apache | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-24-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-24-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.24-apache-bullseye-build) | `24.x` | apache | Yes | Debian Bullseye | -| [thecodingmachine/nodejs:v2-26-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-bullseye-build)
[ghcr.io/thecodingmachine/nodejs:v2-26-apache-bullseye-build](https://github.com/thecodingmachine/docker-images-nodejs/blob/master/Dockerfile.26-apache-bullseye-build) | `26.x` | apache | Yes | Debian Bullseye | Note: we do not tag minor releases of NodeJS, only major versions. You will find for example an image for NodeJS 18.x, but no tagged image for NodeJS 18.2. This is because NodeJS follows SemVer and we believe you have no valid reason to ask explicitly for 18.2. @@ -67,20 +43,20 @@ the most up-to-date version of the NodeJS 18.x branch. Example with standalone: ```bash -$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/nodejs:v2-18-bullseye node your-script.js +$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app thecodingmachine/nodejs:v2-24-trixie node your-script.js ``` Example with Apache: ```bash -$ docker run -p 80:80 --name my-apache-app -v "$PWD":/var/www/html thecodingmachine/nodejs:v2-18-apache-bullseye +$ docker run -p 80:80 --name my-apache-app -v "$PWD":/var/www/html thecodingmachine/nodejs:v2-24-apache-trixie ``` Example with Apache + Node 18.x in a Dockerfile: **Dockerfile** ```Dockerfile -FROM thecodingmachine/nodejs:v2-18-apache-bullseye +FROM thecodingmachine/nodejs:v2-24-apache-trixie COPY src/ /var/www/html/ RUN yarn install @@ -118,7 +94,7 @@ For instance: version: '3' services: my_app: - image: thecodingmachine/nodejs:v2-18-apache-bullseye + image: thecodingmachine/nodejs:v2-24-apache-trixie environment: # Enable the DAV extension for Apache APACHE_EXTENSION_DAV: 1 @@ -219,7 +195,7 @@ If such a file is mounted in the image, it will be executed on container startup ```bash docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp \ - -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/nodejs:v2-18-bullseye node your-script.js + -v $PWD/my-startup-script.sh:/etc/container/startup.sh thecodingmachine/nodejs:v2-24-trixie node your-script.js ``` ## Registering SSH private keys @@ -238,7 +214,7 @@ This option is the easiest way to go if you are using the image on a development version: '3' services: my_app: - image: thecodingmachine/nodejs:v2-18-bullseye + image: thecodingmachine/nodejs:v2-24-trixie volumes: - ~/.ssh:/home/docker/.ssh ``` @@ -297,7 +273,7 @@ kind: Pod spec: containers: - name: foobar - image: thecodingmachine/nodejs:v2-18-bullseye + image: thecodingmachine/nodejs:v2-24-trixie securityContext: allowPrivilegeEscalation: true # never use "false" here. ``` @@ -317,5 +293,5 @@ This command will generate all the files from the "blueprint" templates. You can then test your changes using the `build-and-test.sh` command: ```bash -TAG=v2-18-bullseye VARIANT=18-bullseye ./build-and-test.sh +TAG=v2-24-trixie VARIANT=24-trixie ./build-and-test.sh ``` diff --git a/orbit.yml b/orbit.yml index e9c013e..33318f6 100644 --- a/orbit.yml +++ b/orbit.yml @@ -19,30 +19,6 @@ tasks: - use: generate short: Generates all Dockerfiles run: - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.16-bullseye -p "NodeVersion,16;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.18-bullseye -p "NodeVersion,18;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.20-bullseye -p "NodeVersion,20;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.22-bullseye -p "NodeVersion,22;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.24-bullseye -p "NodeVersion,24;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.26-bullseye -p "NodeVersion,26;Variant,standalone;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.16-apache-bullseye -p "NodeVersion,16;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.18-apache-bullseye -p "NodeVersion,18;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.20-apache-bullseye -p "NodeVersion,20;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.22-apache-bullseye -p "NodeVersion,22;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.24-apache-bullseye -p "NodeVersion,24;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.26-apache-bullseye -p "NodeVersion,26;Variant,apache;BaseImage,debian:bullseye-slim;Build,false" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.16-bullseye-build -p "NodeVersion,16;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.18-bullseye-build -p "NodeVersion,18;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.20-bullseye-build -p "NodeVersion,20;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.22-bullseye-build -p "NodeVersion,22;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.24-bullseye-build -p "NodeVersion,24;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.26-bullseye-build -p "NodeVersion,26;Variant,standalone;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.16-apache-bullseye-build -p "NodeVersion,16;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.18-apache-bullseye-build -p "NodeVersion,18;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.20-apache-bullseye-build -p "NodeVersion,20;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.22-apache-bullseye-build -p "NodeVersion,22;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.24-apache-bullseye-build -p "NodeVersion,24;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.26-apache-bullseye-build -p "NodeVersion,26;Variant,apache;BaseImage,debian:bullseye-slim;Build,true" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.20-trixie -p "NodeVersion,20;Variant,standalone;BaseImage,debian:trixie-slim;Build,false" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.22-trixie -p "NodeVersion,22;Variant,standalone;BaseImage,debian:trixie-slim;Build,false" - orbit generate -f utils/Dockerfile.blueprint -o Dockerfile.24-trixie -p "NodeVersion,24;Variant,standalone;BaseImage,debian:trixie-slim;Build,false"