Skip to content

Commit

Permalink
Fix version of alpine and upgrade php and composer
Browse files Browse the repository at this point in the history
  • Loading branch information
jdel committed Jan 31, 2023
1 parent 6651003 commit 679a1c0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:edge
FROM alpine:3.17
LABEL maintainer="Julien Del-Piccolo <[email protected]>"
LABEL branch=${BRANCH}
LABEL commit=${COMMIT}
Expand All @@ -7,19 +7,20 @@ USER root

COPY . /var/www/localhost/htdocs/

RUN apk update && apk add --no-cache ca-certificates curl apache2 php8-apache2 php8-phar php8-ctype php8-json \
&& apk add --virtual=.build-dependencies openssl php8 php8-openssl php8-iconv php8-mbstring git \
RUN apk update && apk add --no-cache ca-certificates curl apache2 php81-apache2 php81-phar php81-ctype php81-json \
&& apk add --virtual=.build-dependencies openssl php81 php81-openssl php81-iconv php81-mbstring git \
&& ln -sf /usr/bin/php81 /usr/local/bin/php \
&& rm -f /var/www/localhost/htdocs/index.html \
&& curl -sSL https://getcomposer.org/download/2.2.6/composer.phar -o /usr/local/bin/composer \
&& curl -sSL https://getcomposer.org/download/2.5.1/composer.phar -o /usr/local/bin/composer \
&& chmod +x /usr/local/bin/composer \
&& cd /var/www/localhost/htdocs \
&& composer install --no-dev \
; rm -f /usr/local/bin/composer \
&& rm -f /usr/local/bin/composer \
&& apk del .build-dependencies \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /run/apache2 \
&& sed -i 's/Listen 80/Listen 8080/' /etc/apache2/httpd.conf \
&& sed -i 's/^variables_order = "GPCS"/variables_order = "EGPCS"/' /etc/php8/php.ini \
&& sed -i 's/^variables_order = "GPCS"/variables_order = "EGPCS"/' /etc/php81/php.ini \
&& ln -sf /dev/stdout /var/log/apache2/access.log \
&& ln -sf /dev/stderr /var/log/apache2/error.log \
&& ln -sf /var/www/localhost/htdocs/packages /packages \
Expand Down

0 comments on commit 679a1c0

Please sign in to comment.