Merge pull request #35 from martialblog/refactor-download

Change download of Limesurvey to curl
This commit is contained in:
Markus Opolka
2020-07-16 19:08:26 +02:00
committed by GitHub
6 changed files with 25 additions and 24 deletions

View File

@@ -58,13 +58,13 @@ RUN a2enmod headers rewrite remoteip; \
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Download, unzip and chmod LimeSurvey from official GitHub repository
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/${version}.tar.gz" && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
COPY entrypoint.sh entrypoint.sh

View File

@@ -30,14 +30,14 @@ RUN set -ex; \
zip
# Download, unzip and chmod of LimeSurvey
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
\
rm -rf "/tmp/${version}.tar.gz" \
rm -rf "/tmp/limesurvey.tar.gz" \
/var/www/html/docs \
/var/www/html/tests \
/var/www/html/*.md && \

View File

@@ -45,13 +45,13 @@ RUN set -ex; \
ENV LIMESURVEY_VERSION=$version
# Download, unzip and chmod LimeSurvey from official GitHub repository
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/${version}.tar.gz" && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
EXPOSE 9000

View File

@@ -18,6 +18,7 @@ RUN set -ex; \
libpng-dev \
libpq-dev \
netcat \
curl \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/*
@@ -58,13 +59,13 @@ RUN a2enmod headers rewrite remoteip; \
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Download, unzip and chmod LimeSurvey from official GitHub repository
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/${version}.tar.gz" && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
COPY entrypoint.sh entrypoint.sh

View File

@@ -31,14 +31,14 @@ RUN set -ex; \
zip
# Download, unzip and chmod of LimeSurvey
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
\
rm -rf "/tmp/${version}.tar.gz" \
rm -rf "/tmp/limesurvey.tar.gz" \
/var/www/html/docs \
/var/www/html/tests \
/var/www/html/*.md && \

View File

@@ -45,13 +45,13 @@ RUN set -ex; \
ENV LIMESURVEY_VERSION=$version
# Download, unzip and chmod LimeSurvey from official GitHub repository
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
RUN curl -sSL "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" --output /tmp/limesurvey.tar.gz
RUN set -ex; \
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/${version}.tar.gz" && \
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
EXPOSE 9000