Skip to content

Commit

Permalink
Manage versions in Dockerfile (#682)
Browse files Browse the repository at this point in the history
Declare versions
  • Loading branch information
wilson1000 authored Aug 29, 2024
1 parent 2073302 commit e9ce56f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#░░
#░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░

ARG version_nginx=1.26
ARG version_node=22
ARG version_cron_alpine=3.19.1

# ▄▄ ▄▄ █▀▀ █▀█ █▀▄▀█ ▄▄ ▄▄ #
# ░░ ░░ █▀░ █▀▀ █░▀░█ ░░ ░░ #
Expand Down Expand Up @@ -42,8 +45,7 @@ WORKDIR /var/www/html
# ▄▄ ▄▄ █▄░█ █▀▀ █ █▄░█ ▀▄▀ ▄▄ ▄▄ #
# ░░ ░░ █░▀█ █▄█ █ █░▀█ █░█ ░░ ░░ #


FROM nginx:1.26-alpine AS nginx-module-builder
FROM nginx:${version_nginx}-alpine AS nginx-module-builder

SHELL ["/bin/ash", "-exo", "pipefail", "-c"]

Expand All @@ -61,7 +63,7 @@ RUN printf "#!/bin/sh\\nSETFATTR=true /usr/bin/abuild -F \"\$@\"\\n" > /usr/loca
BUILT_MODULES="$BUILT_MODULES $(echo cachepurge | tr '[A-Z]' '[a-z]' | tr -d '[/_\-\.\t ]')"; \
echo "BUILT_MODULES=\"$BUILT_MODULES\"" > /tmp/packages/modules.env

FROM nginxinc/nginx-unprivileged:1.26-alpine AS base-nginx
FROM nginxinc/nginx-unprivileged:${version_nginx}-alpine AS base-nginx

USER root

Expand Down Expand Up @@ -177,7 +179,7 @@ RUN mkdir -p ./vendor-assets && \
# █▀█ ▄█ ▄█ ██▄ ░█░ ▄█


FROM node:22-alpine AS assets-build
FROM node:${version_node}-alpine AS assets-build

WORKDIR /node
COPY ./public/app/themes/clarity /node/
Expand Down Expand Up @@ -247,7 +249,7 @@ COPY --from=assets-build --chown=nginx:nginx /node/style.css public/app/themes/c
# █▄▄ █▀▄ █▄█ █░▀█


FROM alpine:3.19.1 AS build-cron
FROM alpine:${version_cron_alpine} AS build-cron

# ▒█▀▀█ █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀ █▀▀█   █
# ▒█░░░ █▄▄▀ █░░█ █░░█ █░░█ █▀▀ █▄▄▀   ▀
Expand Down

0 comments on commit e9ce56f

Please sign in to comment.