From 8c3f19d33f5048922893c725bf1986e9a7e9b292 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Tue, 7 Dec 2021 07:42:41 +0000 Subject: [PATCH 1/2] fixe issue #1060 --- Dockerfile | 3 +++ flavors/php/Dockerfile | 3 +++ megalinter/descriptors/php.megalinter-descriptor.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5b7f8febd7c..59a77c58eab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,6 +105,7 @@ RUN apk add --update --no-cache \ php8-dom \ php8-simplexml \ composer \ + dpkg \ ruby \ ruby-dev \ ruby-bundler \ @@ -267,6 +268,8 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ && rm phive.phar.asc +RUN update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \ + && update-alternatives --install /usr/bin/php php /usr/bin/php8 10 # POWERSHELL installation diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 61f58e1f316..01f9f8c81cd 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -83,6 +83,7 @@ RUN apk add --update --no-cache \ php8-dom \ php8-simplexml \ composer \ + dpkg \ ansible \ ansible-lint \ libc-dev \ @@ -185,6 +186,8 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ && rm phive.phar.asc +RUN update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \ + && update-alternatives --install /usr/bin/php php /usr/bin/php8 10 # actionlint installation diff --git a/megalinter/descriptors/php.megalinter-descriptor.yml b/megalinter/descriptors/php.megalinter-descriptor.yml index 1aed0763f3c..b8632758a84 100644 --- a/megalinter/descriptors/php.megalinter-descriptor.yml +++ b/megalinter/descriptors/php.megalinter-descriptor.yml @@ -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 \ @@ -39,6 +40,8 @@ install: && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ && rm phive.phar.asc + RUN 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 From a0abe31ee1d970e6970d7dcc34253addb8c064ca Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Tue, 7 Dec 2021 17:00:37 +0100 Subject: [PATCH 2/2] fix hadolint error DL3059 --- Dockerfile | 4 ++-- flavors/php/Dockerfile | 4 ++-- megalinter/descriptors/php.megalinter-descriptor.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59a77c58eab..ae3b7ed4ebf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -267,8 +267,8 @@ 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 -RUN update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \ + && 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 diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 01f9f8c81cd..89603c9878a 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -185,8 +185,8 @@ 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 -RUN update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \ + && 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 diff --git a/megalinter/descriptors/php.megalinter-descriptor.yml b/megalinter/descriptors/php.megalinter-descriptor.yml index b8632758a84..9d12f4f60c2 100644 --- a/megalinter/descriptors/php.megalinter-descriptor.yml +++ b/megalinter/descriptors/php.megalinter-descriptor.yml @@ -39,8 +39,8 @@ install: && gpg --verify phive.phar.asc phive.phar \ && chmod +x phive.phar \ && mv phive.phar /usr/local/bin/phive \ - && rm phive.phar.asc - RUN update-alternatives --install /usr/bin/php php /usr/bin/php7 100 \ + && 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