Add a 'archive_url' build argument (#123)

* Use archive_url ARG to modify download URL
* Make ARG quoting consistent
This commit is contained in:
Edgar R. M
2022-06-03 04:10:01 -05:00
committed by GitHub
parent f5da02dd55
commit 7ee31a96ec
9 changed files with 45 additions and 36 deletions

View File

@@ -1,7 +1,8 @@
FROM php:8.0-apache
LABEL maintainer="markus@martialblog.de"
ARG version='5.3.17+220525'
ARG sha256_checksum='fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8'
ARG version="5.3.17+220525"
ARG sha256_checksum="fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8"
ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz"
ARG USER=www-data
ARG LISTEN_PORT=8080
@@ -66,9 +67,9 @@ RUN a2enmod headers rewrite remoteip; \
# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Download, unzip and chmod LimeSurvey from official GitHub repository
# Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)
RUN set -ex; \
curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz && \
curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \

View File

@@ -1,7 +1,8 @@
FROM php:8.0-fpm-alpine
LABEL maintainer="markus@martialblog.de"
ARG version='5.3.17+220525'
ARG sha256_checksum='fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8'
ARG version="5.3.17+220525"
ARG sha256_checksum="fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8"
ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz"
ARG USER=www-data
# Install OS dependencies
@@ -37,9 +38,9 @@ RUN set -ex; \
tidy \
zip
# Download, unzip and chmod LimeSurvey from official GitHub repository
# Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)
RUN set -ex; \
curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz && \
curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \

View File

@@ -1,7 +1,8 @@
FROM php:8.0-fpm
LABEL maintainer="markus@martialblog.de"
ARG version='5.3.17+220525'
ARG sha256_checksum='fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8'
ARG version="5.3.17+220525"
ARG sha256_checksum="fe94c4d9dc11bf0742855c70ce496be48e5556365f403fe9fcb433ed0b0494a8"
ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz"
ARG USER=www-data
# Install OS dependencies
@@ -51,9 +52,9 @@ RUN set -ex; \
ENV LIMESURVEY_VERSION=$version
# Download, unzip and chmod LimeSurvey from official GitHub repository
# Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)
RUN set -ex; \
curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz && \
curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \