Skip to content
Snippets Groups Projects
Commit d2140f25 authored by jurgenhaas's avatar jurgenhaas
Browse files

l3d#46 Change base image

parent ac6a12bf
No related branches found
Tags v1.6.1
No related merge requests found
Pipeline #28248 failed
v1.5.0 2020-10-15
v1.5.1 2020-10-15
-----------------
Add container for PHP 7.4
Change build strategy: use PHP-Alpine image instead of vanilla Alpine
v1.4.4 2020-05-22
-----------------
......
ARG ALPINE_VERSION
ARG PHP_VERSION
FROM alpine:${ALPINE_VERSION}
FROM php:${PHP_VERSION}-cli-alpine${ALPINE_VERSION}
ARG VERSION
......@@ -49,7 +50,7 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
echo "StrictHostKeyChecking no" >> /root/.ssh/config && \
\
apk update && \
apk add --no-cache mdocml-apropos openssh wget make patch bash fish python3 git git-lfs unzip acl && \
apk add --no-cache mdocml-apropos openssh wget make patch bash fish python3 git git-lfs unzip acl libpng-dev libzip-dev gnu-libiconv && \
\
wget -q https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub && \
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${glibc_version}/glibc-${glibc_version}.apk && \
......@@ -78,34 +79,13 @@ RUN echo 'hosts: files dns' > /etc/nsswitch.conf && \
cd .. && \
rm -rf git-extras && \
\
cp /etc/apk/repositories /etc/apk/repositories.org && \
echo "http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/main" > /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/community" >> /etc/apk/repositories && \
apk update && \
apk add --no-cache \
php7 php7-phar php7-json php7-dom php7-gd php7-mbstring php7-openssl \
php7-pdo php7-curl php7-xml php7-zip php7-session php7-ctype php7-iconv \
php7-bcmath && \
if [ "${PHP_VERSION}" = "7.0" ]; then \
echo "no extra packages required" ; \
else \
apk add --no-cache php7-fileinfo php7-tokenizer php7-simplexml php7-xmlreader php7-xmlwriter ; \
fi && \
if [ "${PHP_VERSION}" = "7.2" ]; then \
apk add --no-cache php7-sodium ; \
fi && \
if [ "${PHP_VERSION}" = "7.3" ]; then \
apk add --no-cache php7-sodium gnu-libiconv ; \
fi && \
if [ "${PHP_VERSION}" = "7.4" ]; then \
apk add --no-cache php7-sodium gnu-libiconv ; \
fi && \
rm /etc/apk/repositories && \
mv /etc/apk/repositories.org /etc/apk/repositories && \
apk update && \
docker-php-ext-install \
bcmath \
gd \
zip && \
\
sed -i -e 's/memory_limit = 128M/memory_limit = -1/g' /etc/php7/php.ini && \
ln -s /usr/bin/php7 /usr/local/bin/php && \
mv /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \
sed -i -e 's/memory_limit = 128M/memory_limit = -1/g' /usr/local/etc/php/php.ini && \
\
composer selfupdate && \
composer global require "hirak/prestissimo:^0.3" && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment