From 2a8c53273eda63c7ac4e59b663e35b89800aa72f Mon Sep 17 00:00:00 2001 From: "Edgar R. M" Date: Fri, 17 Jun 2022 02:03:45 -0500 Subject: [PATCH] feat: Move ARG instructions right before where they are used (#124) --- 3.0/apache/Dockerfile | 14 +++++++------- 3.0/fpm-alpine/Dockerfile | 8 +++++--- 3.0/fpm/Dockerfile | 6 +++--- 5.0/apache/Dockerfile | 14 +++++++------- 5.0/fpm-alpine/Dockerfile | 10 ++++++---- 5.0/fpm/Dockerfile | 8 ++++---- 6 files changed, 32 insertions(+), 28 deletions(-) diff --git a/3.0/apache/Dockerfile b/3.0/apache/Dockerfile index a9c3eec..e23272b 100644 --- a/3.0/apache/Dockerfile +++ b/3.0/apache/Dockerfile @@ -1,10 +1,5 @@ FROM php:8.0-apache LABEL maintainer="markus@martialblog.de" -ARG version="3.28.13+220531" -ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" -ARG USER=root -ARG LISTEN_PORT=80 # Install OS dependencies RUN set -ex; \ @@ -51,8 +46,6 @@ RUN set -ex; \ tidy \ zip -ENV LIMESURVEY_VERSION=$version - # Apache configuration RUN a2enmod headers rewrite remoteip; \ {\ @@ -66,6 +59,13 @@ RUN a2enmod headers rewrite remoteip; \ # Use the default production configuration RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" +ARG version="3.28.13+220531" +ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" +ARG USER=root +ARG LISTEN_PORT=80 +ENV LIMESURVEY_VERSION=$version + # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository) RUN set -ex; \ curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \ diff --git a/3.0/fpm-alpine/Dockerfile b/3.0/fpm-alpine/Dockerfile index 03c2c62..ca19556 100644 --- a/3.0/fpm-alpine/Dockerfile +++ b/3.0/fpm-alpine/Dockerfile @@ -1,8 +1,5 @@ FROM php:8.0-fpm-alpine LABEL maintainer="markus@martialblog.de" -ARG version="3.28.13+220531" -ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" # Install OS dependencies RUN set -ex; \ @@ -36,6 +33,11 @@ RUN set -ex; \ tidy \ zip +ARG version="3.28.13+220531" +ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" +ENV LIMESURVEY_VERSION=$version + # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository) RUN set -ex; \ curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \ diff --git a/3.0/fpm/Dockerfile b/3.0/fpm/Dockerfile index 6d430a1..cc85ff4 100644 --- a/3.0/fpm/Dockerfile +++ b/3.0/fpm/Dockerfile @@ -1,8 +1,5 @@ FROM php:8.0-fpm LABEL maintainer="markus@martialblog.de" -ARG version="3.28.13+220531" -ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" # Install OS dependencies RUN set -ex; \ @@ -49,6 +46,9 @@ RUN set -ex; \ tidy \ zip +ARG version="3.28.13+220531" +ARG sha256_checksum="57273ebd94c54e1501496451137f2d1cf205551c7dd0eebcb42b6aebeec6e1a7" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" ENV LIMESURVEY_VERSION=$version # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository) diff --git a/5.0/apache/Dockerfile b/5.0/apache/Dockerfile index 903e6bf..688cc1e 100644 --- a/5.0/apache/Dockerfile +++ b/5.0/apache/Dockerfile @@ -1,10 +1,5 @@ FROM php:8.0-apache LABEL maintainer="markus@martialblog.de" -ARG version="5.3.18+220530" -ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" -ARG USER=www-data -ARG LISTEN_PORT=8080 # Install OS dependencies RUN set -ex; \ @@ -52,8 +47,6 @@ RUN set -ex; \ tidy \ zip -ENV LIMESURVEY_VERSION=$version - # Apache configuration RUN a2enmod headers rewrite remoteip; \ {\ @@ -67,6 +60,13 @@ RUN a2enmod headers rewrite remoteip; \ # Use the default production configuration RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" +ARG version="5.3.18+220530" +ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" +ARG USER=www-data +ARG LISTEN_PORT=8080 +ENV LIMESURVEY_VERSION=$version + # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository) RUN set -ex; \ curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \ diff --git a/5.0/fpm-alpine/Dockerfile b/5.0/fpm-alpine/Dockerfile index a1a3257..e5aff50 100644 --- a/5.0/fpm-alpine/Dockerfile +++ b/5.0/fpm-alpine/Dockerfile @@ -1,9 +1,5 @@ FROM php:8.0-fpm-alpine LABEL maintainer="markus@martialblog.de" -ARG version="5.3.18+220530" -ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" -ARG USER=www-data # Install OS dependencies RUN set -ex; \ @@ -38,6 +34,12 @@ RUN set -ex; \ tidy \ zip +ARG version="5.3.18+220530" +ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" +ARG USER=www-data +ENV LIMESURVEY_VERSION=$version + # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository) RUN set -ex; \ curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \ diff --git a/5.0/fpm/Dockerfile b/5.0/fpm/Dockerfile index 3429858..42f6b75 100644 --- a/5.0/fpm/Dockerfile +++ b/5.0/fpm/Dockerfile @@ -1,9 +1,5 @@ FROM php:8.0-fpm LABEL maintainer="markus@martialblog.de" -ARG version="5.3.18+220530" -ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" -ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" -ARG USER=www-data # Install OS dependencies RUN set -ex; \ @@ -50,6 +46,10 @@ RUN set -ex; \ tidy \ zip +ARG version="5.3.18+220530" +ARG sha256_checksum="3b866045dcefd78dab39bcef186a8e4ca6408c08e4c43b636415e75610fa9434" +ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" +ARG USER=www-data ENV LIMESURVEY_VERSION=$version # Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)