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 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..6428a4d 100644 --- a/kool.yml +++ b/kool.yml @@ -7,3 +7,5 @@ scripts: - 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.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/*