From a5ce93d5896f2a51bd26dc5e0a08982e1ea10587 Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Thu, 5 Oct 2023 16:59:06 -0300 Subject: [PATCH 1/3] Fix Build --- 8.0-nginx-swoole-prod/Dockerfile | 8 ++++++-- 8.0-nginx-swoole/Dockerfile | 8 ++++++-- 8.1-nginx-swoole-prod/Dockerfile | 8 ++++++-- 8.1-nginx-swoole/Dockerfile | 8 ++++++-- 8.2-nginx-swoole-prod/Dockerfile | 8 ++++++-- 8.2-nginx-swoole/Dockerfile | 8 ++++++-- kool.yml | 4 +++- template/Dockerfile.blade.php | 8 ++++++-- 8 files changed, 45 insertions(+), 15 deletions(-) diff --git a/8.0-nginx-swoole-prod/Dockerfile b/8.0-nginx-swoole-prod/Dockerfile index 43127aa..48487b0 100644 --- a/8.0-nginx-swoole-prod/Dockerfile +++ b/8.0-nginx-swoole-prod/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.0-nginx-prod RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/8.0-nginx-swoole/Dockerfile b/8.0-nginx-swoole/Dockerfile index e135537..b964d66 100644 --- a/8.0-nginx-swoole/Dockerfile +++ b/8.0-nginx-swoole/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.0-nginx RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/8.1-nginx-swoole-prod/Dockerfile b/8.1-nginx-swoole-prod/Dockerfile index a33e4ce..37d250b 100644 --- a/8.1-nginx-swoole-prod/Dockerfile +++ b/8.1-nginx-swoole-prod/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.1-nginx-prod RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/8.1-nginx-swoole/Dockerfile b/8.1-nginx-swoole/Dockerfile index 72646e0..b294c51 100644 --- a/8.1-nginx-swoole/Dockerfile +++ b/8.1-nginx-swoole/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.1-nginx RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/8.2-nginx-swoole-prod/Dockerfile b/8.2-nginx-swoole-prod/Dockerfile index 8162546..240573a 100644 --- a/8.2-nginx-swoole-prod/Dockerfile +++ b/8.2-nginx-swoole-prod/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.2-nginx-prod RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/8.2-nginx-swoole/Dockerfile b/8.2-nginx-swoole/Dockerfile index e1eccca..c484fbf 100644 --- a/8.2-nginx-swoole/Dockerfile +++ b/8.2-nginx-swoole/Dockerfile @@ -2,7 +2,8 @@ FROM kooldev/php:8.2-nginx RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ RUN docker-php-ext-install sockets && \ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* diff --git a/kool.yml b/kool.yml index 6616908..6d34a07 100644 --- a/kool.yml +++ b/kool.yml @@ -5,5 +5,7 @@ scripts: - kool run template - docker build --pull -t kooldev/php:8.0-nginx-swoole 8.0-nginx-swoole - docker build --pull -t kooldev/php:8.0-nginx-swoole-prod 8.0-nginx-swoole-prod - - docker build --pull -t kooldev/php:8.1-nginx-swoole 8.1-nginx-swoole + - docker build --pull -t kooldev/php:8.2-nginx-swoole 8.1-nginx-swoole - docker build --pull -t kooldev/php:8.1-nginx-swoole-prod 8.1-nginx-swoole-prod + - docker build --pull -t kooldev/php:8.2-nginx-swoole 8.2-nginx-swoole + - docker build --pull -t kooldev/php:8.2-nginx-swoole-prod 8.2-nginx-swoole-prod diff --git a/template/Dockerfile.blade.php b/template/Dockerfile.blade.php index 5f96581..11dec3b 100644 --- a/template/Dockerfile.blade.php +++ b/template/Dockerfile.blade.php @@ -2,7 +2,8 @@ RUN apk add libpq libpq-dev curl-dev -RUN docker-php-ext-install sockets && \ +RUN apk add --no-cache --virtual .build-deps linux-headers && \ + docker-php-ext-install sockets && \ docker-php-source extract && \ mkdir /usr/src/php/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.0.tar.gz -o swoole.tar.gz && \ @@ -12,4 +13,7 @@ --enable-swoole-pgsql \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ - docker-php-ext-install -j$(nproc) swoole + docker-php-ext-install -j$(nproc) swoole && \ + # cleanup + apk del .build-deps && \ + rm -rf /var/cache/apk/* /tmp/* From 99c2c0cd0dc03bc099542e61dfc4d868de68027e Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Thu, 5 Oct 2023 17:00:47 -0300 Subject: [PATCH 2/3] Tweak --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b0c47d3..eb9504e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,6 +1,6 @@ name: CI/CD -on: [push, workflow_dispatch] +on: [push, pull_request, workflow_dispatch] env: DOCKER_BUILDKIT: 1 From 5be8fb90dd391b5f9d906b7a74e48c2ae9b4e420 Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Thu, 5 Oct 2023 17:01:29 -0300 Subject: [PATCH 3/3] Tweak --- kool.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kool.yml b/kool.yml index 6d34a07..6428a4d 100644 --- a/kool.yml +++ b/kool.yml @@ -5,7 +5,7 @@ scripts: - kool run template - docker build --pull -t kooldev/php:8.0-nginx-swoole 8.0-nginx-swoole - docker build --pull -t kooldev/php:8.0-nginx-swoole-prod 8.0-nginx-swoole-prod - - docker build --pull -t kooldev/php:8.2-nginx-swoole 8.1-nginx-swoole + - docker build --pull -t kooldev/php:8.1-nginx-swoole 8.1-nginx-swoole - docker build --pull -t kooldev/php:8.1-nginx-swoole-prod 8.1-nginx-swoole-prod - docker build --pull -t kooldev/php:8.2-nginx-swoole 8.2-nginx-swoole - docker build --pull -t kooldev/php:8.2-nginx-swoole-prod 8.2-nginx-swoole-prod