Commit 7226122f authored by Mickaël Bourgier's avatar Mickaël Bourgier
Browse files

[php72] Fix php version + update composer to 1.9.3 + add rsync

parent 30a6d280
FROM php:7.2-fpm-alpine
FROM php:7.2.27-fpm-alpine
# Upgrade packages
RUN apk update && apk upgrade
......@@ -28,18 +28,20 @@ RUN apk add \
&& apk del $PHPIZE_DEPS
# Install composer
RUN curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://raw.githubusercontent.com/composer/getcomposer.org/b107d959a5924af895807021fcef4ffec5a76aa9/web/installer \
&& php -r " \
\$signature = '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061'; \
\$hash = hash('SHA384', file_get_contents('/tmp/installer.php')); \
if (!hash_equals(\$signature, \$hash)) { \
unlink('/tmp/installer.php'); \
echo 'Integrity check failed, installer is either corrupt or worse.' . PHP_EOL; \
exit(1); \
}" \
&& php /tmp/installer.php --no-ansi --install-dir=/usr/bin --filename=composer --version=1.8.0 \
&& composer --ansi --version --no-interaction \
&& rm -rf /tmp/*
RUN set -eux; \
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://raw.githubusercontent.com/composer/getcomposer.org/cb19f2aa3aeaa2006c0cd69a7ef011eb31463067/web/installer; \
php -r " \
\$signature = '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5'; \
\$hash = hash('sha384', file_get_contents('/tmp/installer.php')); \
if (!hash_equals(\$signature, \$hash)) { \
unlink('/tmp/installer.php'); \
echo 'Integrity check failed, installer is either corrupt or worse.' . PHP_EOL; \
exit(1); \
}"; \
php /tmp/installer.php --no-ansi --install-dir=/usr/bin --filename=composer --version=1.9.3; \
composer --ansi --version --no-interaction; \
rm -f /tmp/installer.php; \
find /tmp -type d -exec chmod -v 1777 {} +
# Install compass
RUN apk add \
......@@ -58,7 +60,8 @@ RUN apk add \
# Install other useful packages
RUN apk add \
git \
openssh-client
openssh-client \
rsync
# Insert user and group to be able to use `docker run` with `--user=chapa` param
RUN echo "chapa:x:1000:985::/home/chapa:/bin/ash" >> /etc/passwd \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment