Skip to content

Commit

Permalink
PHP version switch (#1083)
Browse files Browse the repository at this point in the history
* fixe issue #1060

* fix hadolint error DL3059
  • Loading branch information
llaville authored Dec 7, 2021
1 parent 3924b3d commit 7f4e809
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ RUN apk add --update --no-cache \
php8-dom \
php8-simplexml \
composer \
dpkg \
ruby \
ruby-dev \
ruby-bundler \
Expand Down Expand Up @@ -266,7 +267,9 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \
&& gpg --verify phive.phar.asc phive.phar \
&& chmod +x phive.phar \
&& mv phive.phar /usr/local/bin/phive \
&& rm phive.phar.asc
&& rm phive.phar.asc \
&& update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8 10


# POWERSHELL installation
Expand Down
5 changes: 4 additions & 1 deletion flavors/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ RUN apk add --update --no-cache \
php8-dom \
php8-simplexml \
composer \
dpkg \
ansible \
ansible-lint \
libc-dev \
Expand Down Expand Up @@ -184,7 +185,9 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \
&& gpg --verify phive.phar.asc phive.phar \
&& chmod +x phive.phar \
&& mv phive.phar /usr/local/bin/phive \
&& rm phive.phar.asc
&& rm phive.phar.asc \
&& update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8 10


# actionlint installation
Expand Down
5 changes: 4 additions & 1 deletion megalinter/descriptors/php.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ install:
- php8-dom
- php8-simplexml
- composer
- dpkg
dockerfile:
- |
RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \
Expand All @@ -38,7 +39,9 @@ install:
&& gpg --verify phive.phar.asc phive.phar \
&& chmod +x phive.phar \
&& mv phive.phar /usr/local/bin/phive \
&& rm phive.phar.asc
&& rm phive.phar.asc \
&& update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \
&& update-alternatives --install /usr/bin/php php /usr/bin/php8 10
linters:
# PHP Built in Linter
- linter_name: php
Expand Down

0 comments on commit 7f4e809

Please sign in to comment.