From d303118a80b06474a184d63809ae5c8394a788e8 Mon Sep 17 00:00:00 2001 From: Carles Mata <4223148+cmmata@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:42:38 +0100 Subject: [PATCH 1/5] feat: configure php-gd extension --- Dockerfile | 3 ++- README.md | 50 ++++++++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22f86b9..ae00bed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,8 @@ RUN apt-get update \ # Install php packages and configure php.ini RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini -RUN docker-php-ext-install intl gd opcache pdo_mysql pdo_pgsql zip +RUN docker-php-ext-configure gd --with-freetype --with-jpeg +RUN docker-php-ext-install iconv intl gd json mbstring opcache pdo_mysql pdo_pgsql xml zip RUN pecl install pcov xdebug \ && docker-php-ext-enable pcov xdebug diff --git a/README.md b/README.md index 155876f..ab3e008 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,28 @@ -![example workflow](https://github.com/appsinet/php_development/actions/workflows/publish.yml/badge.svg) -# php_development -A Docker image based on official PHP, with some extras for development / CI. - -## PHP Modules -- iconv -- intl -- json -- mbstring -- opcache -- pcov -- pdo_mysql -- pdo_pgsql -- xdebug -- xml -- zip - -## Utilities -- composer -- postgresql-client -- local-php-security-checker -- mariadb-client \ No newline at end of file +![example workflow](https://github.com/appsinet/php_development/actions/workflows/publish.yml/badge.svg) +# php_development +A Docker image based on official PHP, with some extras for development / CI. + +## PHP Modules +- iconv +- intl +- gd +- json +- mbstring +- opcache +- pcov +- pdo_mysql +- pdo_pgsql +- xdebug +- xml +- zip + +## Utilities +- ansible +- ansible-lint +- ansistrano +- composer +- local-php-security-checker +- mariadb-client +- node 18 +- postgresql-client +- sentry cli \ No newline at end of file From 49a46fcba2681e126bc164a6b7ffe13f0879aac1 Mon Sep 17 00:00:00 2001 From: Carles Mata <4223148+cmmata@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:43:01 +0100 Subject: [PATCH 2/5] feat: upgrade local php security checker --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae00bed..5e91b12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,9 +27,9 @@ COPY install_composer.sh install_composer.sh RUN sh install_composer.sh \ && mv composer.phar /usr/local/bin/composer -RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v1.2.0/local-php-security-checker_1.2.0_linux_amd64 \ - && chmod +x local-php-security-checker_1.2.0_linux_amd64 \ - && mv local-php-security-checker_1.2.0_linux_amd64 /usr/local/bin/local-php-security-checker +RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64 \ + && chmod +x local-php-security-checker_2.0.6_linux_amd64 \ + && mv local-php-security-checker_2.0.6_linux_amd64 /usr/local/bin/local-php-security-checker # Ansistrano roles for deployment RUN ansible-galaxy install ansistrano.deploy ansistrano.rollback From 182b38daeb9c264bdfb3f13aff4ff819aa3f184a Mon Sep 17 00:00:00 2001 From: Carles Mata <4223148+cmmata@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:49:39 +0100 Subject: [PATCH 3/5] ci: :construction_worker: execute build action on pull requests --- .github/workflows/ci.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a09f0d0..19d7d57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,19 @@ -name: Build Docker image - -on: - push: - branches: - - '*' - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Build - uses: docker/build-push-action@v3 - with: - push: false +name: Build Docker image + +on: + push: + branches: + - '*' + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Build + uses: docker/build-push-action@v3 + with: + push: false From 42201de179f3eeb43cf52c2a9dab1abec1a6e544 Mon Sep 17 00:00:00 2001 From: Carles Mata <4223148+cmmata@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:59:27 +0100 Subject: [PATCH 4/5] ci: remove json that is breaking the build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5e91b12..8cc7be7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update \ # Install php packages and configure php.ini RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini RUN docker-php-ext-configure gd --with-freetype --with-jpeg -RUN docker-php-ext-install iconv intl gd json mbstring opcache pdo_mysql pdo_pgsql xml zip +RUN docker-php-ext-install iconv intl gd mbstring opcache pdo_mysql pdo_pgsql xml zip RUN pecl install pcov xdebug \ && docker-php-ext-enable pcov xdebug From a4eac64fa33e2eed00ce98c02cc4624fbeb71bb0 Mon Sep 17 00:00:00 2001 From: Carles Mata <4223148+cmmata@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:10:08 +0100 Subject: [PATCH 5/5] ci: remove more failing php libs --- Dockerfile | 2 +- README.md | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8cc7be7..745e517 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update \ # Install php packages and configure php.ini RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini RUN docker-php-ext-configure gd --with-freetype --with-jpeg -RUN docker-php-ext-install iconv intl gd mbstring opcache pdo_mysql pdo_pgsql xml zip +RUN docker-php-ext-install intl gd opcache pdo_mysql pdo_pgsql zip RUN pecl install pcov xdebug \ && docker-php-ext-enable pcov xdebug diff --git a/README.md b/README.md index ab3e008..5d3ec76 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,13 @@ A Docker image based on official PHP, with some extras for development / CI. ## PHP Modules -- iconv - intl - gd -- json -- mbstring - opcache - pcov - pdo_mysql - pdo_pgsql - xdebug -- xml - zip ## Utilities