diff --git a/Dockerfile.14-apache-bullseye b/Dockerfile.14-apache-bullseye deleted file mode 100644 index 50056c7..0000000 --- a/Dockerfile.14-apache-bullseye +++ /dev/null @@ -1,229 +0,0 @@ -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours 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 && adduser docker sudo - # 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 &&\ - curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn - -# |-------------------------------------------------------------------------- -# | 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=14.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.14-apache-bullseye-build b/Dockerfile.14-apache-bullseye-build deleted file mode 100644 index 871f02a..0000000 --- a/Dockerfile.14-apache-bullseye-build +++ /dev/null @@ -1,233 +0,0 @@ -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours 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 && adduser docker sudo - # 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 &&\ - curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn - -# |-------------------------------------------------------------------------- -# | 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=14.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.14-bullseye b/Dockerfile.14-bullseye deleted file mode 100644 index 947ddc5..0000000 --- a/Dockerfile.14-bullseye +++ /dev/null @@ -1,137 +0,0 @@ -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours 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 && adduser docker sudo - # 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 &&\ - curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn - -# |-------------------------------------------------------------------------- -# | 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=14.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.14-bullseye-build b/Dockerfile.14-bullseye-build deleted file mode 100644 index 1ea6bf8..0000000 --- a/Dockerfile.14-bullseye-build +++ /dev/null @@ -1,141 +0,0 @@ -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.blueprint) -# DO NOT EDIT THIS FILE : Make yours 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 && adduser docker sudo - # 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 &&\ - curl -sL https://deb.nodesource.com/setup_14.x | bash - &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends nodejs - -# |-------------------------------------------------------------------------- -# | yarn -# |-------------------------------------------------------------------------- -# | -# | Installs yarn. It provides some nice improvements over npm. -# | - -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn - -# |-------------------------------------------------------------------------- -# | 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=14.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.16-apache-bullseye b/Dockerfile.16-apache-bullseye index 2187989..9e653a5 100644 --- a/Dockerfile.16-apache-bullseye +++ b/Dockerfile.16-apache-bullseye @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.16-apache-bullseye-build b/Dockerfile.16-apache-bullseye-build index b0c2dca..d70f250 100644 --- a/Dockerfile.16-apache-bullseye-build +++ b/Dockerfile.16-apache-bullseye-build @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.16-bullseye b/Dockerfile.16-bullseye index 3713cfd..c57ba90 100644 --- a/Dockerfile.16-bullseye +++ b/Dockerfile.16-bullseye @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.16-bullseye-build b/Dockerfile.16-bullseye-build index 1c3acaa..2cb66a5 100644 --- a/Dockerfile.16-bullseye-build +++ b/Dockerfile.16-bullseye-build @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.18-apache-bullseye b/Dockerfile.18-apache-bullseye index c6ca416..a3f96c5 100644 --- a/Dockerfile.18-apache-bullseye +++ b/Dockerfile.18-apache-bullseye @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.18-apache-bullseye-build b/Dockerfile.18-apache-bullseye-build index 6050929..1c8292e 100644 --- a/Dockerfile.18-apache-bullseye-build +++ b/Dockerfile.18-apache-bullseye-build @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.18-bullseye b/Dockerfile.18-bullseye index 3225f16..cc1ebf6 100644 --- a/Dockerfile.18-bullseye +++ b/Dockerfile.18-bullseye @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.18-bullseye-build b/Dockerfile.18-bullseye-build index a5dadce..d2ace69 100644 --- a/Dockerfile.18-bullseye-build +++ b/Dockerfile.18-bullseye-build @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.20-apache-bullseye b/Dockerfile.20-apache-bullseye index 018953e..758244c 100644 --- a/Dockerfile.20-apache-bullseye +++ b/Dockerfile.20-apache-bullseye @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.20-apache-bullseye-build b/Dockerfile.20-apache-bullseye-build index 64d882e..5c4c11a 100644 --- a/Dockerfile.20-apache-bullseye-build +++ b/Dockerfile.20-apache-bullseye-build @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.20-bullseye b/Dockerfile.20-bullseye index 4a43112..402e863 100644 --- a/Dockerfile.20-bullseye +++ b/Dockerfile.20-bullseye @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.20-bullseye-build b/Dockerfile.20-bullseye-build index 30e8d43..e45d6f2 100644 --- a/Dockerfile.20-bullseye-build +++ b/Dockerfile.20-bullseye-build @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.22-apache-bullseye b/Dockerfile.22-apache-bullseye index eb6349d..ba34f56 100644 --- a/Dockerfile.22-apache-bullseye +++ b/Dockerfile.22-apache-bullseye @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.22-apache-bullseye-build b/Dockerfile.22-apache-bullseye-build index b682f6a..839aa27 100644 --- a/Dockerfile.22-apache-bullseye-build +++ b/Dockerfile.22-apache-bullseye-build @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.22-bullseye b/Dockerfile.22-bullseye index db8e9e4..fa3344c 100644 --- a/Dockerfile.22-bullseye +++ b/Dockerfile.22-bullseye @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.22-bullseye-build b/Dockerfile.22-bullseye-build index cadad71..04a5de3 100644 --- a/Dockerfile.22-bullseye-build +++ b/Dockerfile.22-bullseye-build @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.24-apache-bullseye b/Dockerfile.24-apache-bullseye index f7924f1..96dc151 100644 --- a/Dockerfile.24-apache-bullseye +++ b/Dockerfile.24-apache-bullseye @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.24-apache-bullseye-build b/Dockerfile.24-apache-bullseye-build index 4052e44..60d4100 100644 --- a/Dockerfile.24-apache-bullseye-build +++ b/Dockerfile.24-apache-bullseye-build @@ -133,10 +133,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.24-bullseye b/Dockerfile.24-bullseye index b4c7c0c..7f3ab55 100644 --- a/Dockerfile.24-bullseye +++ b/Dockerfile.24-bullseye @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/Dockerfile.24-bullseye-build b/Dockerfile.24-bullseye-build index 04f547c..03daacf 100644 --- a/Dockerfile.24-bullseye-build +++ b/Dockerfile.24-bullseye-build @@ -63,10 +63,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN corepack enable && corepack prepare yarn@stable --activate # |-------------------------------------------------------------------------- # | PATH updating diff --git a/utils/Dockerfile.blueprint b/utils/Dockerfile.blueprint index 442cf3f..65d4a0f 100644 --- a/utils/Dockerfile.blueprint +++ b/utils/Dockerfile.blueprint @@ -137,10 +137,7 @@ RUN apt-get update &&\ # | Installs yarn. It provides some nice improvements over npm. # | -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\ - apt-get update &&\ - apt-get install -y --no-install-recommends yarn +RUN {{ if lt $node_version "16" }}npm install -g yarn{{ else }}corepack enable && corepack prepare yarn@stable --activate{{ end }} # |-------------------------------------------------------------------------- # | PATH updating