From 08a05bf1bf75f099313f42559c56635e6d0b94f4 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 12 Aug 2023 08:55:52 +0200 Subject: [PATCH] Add Alpine version, arm64 platform --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/build.yml | 13 ++++++++++++- .github/workflows/manual.yaml | 13 ++++++++++++- build.sh | 4 ++-- docker-compose.yml | 9 ++++++--- src/docker/8.2/Dockerfile | 2 +- src/docker/8.2/Dockerfile.alpine | 21 +++++++++++++++++++++ 7 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 .DS_Store create mode 100644 src/docker/8.2/Dockerfile.alpine diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cef791ac50954cbab64052785a9e1a8a76e53f79 GIT binary patch literal 6148 zcmeHKF;5#Y7=0$E5{fFJPAwJEAysTWHNT(-ItB)oG9y6}ltjJsA`+w`wbHHq7v0*e zTW1#j0Uf$l>W}DD-e((P-zC{V74j$9&*$%b_UCsOI|iV3&blpN4M3AcFnY{thKXNF z&6aG>bE1+l@?PtpQw&EnX6OhC1O@&_1?0CIAwdrVOuXN3V{_g04T~&m=S7=+&DPb+ z_dmBTw|#$ip?}nO_J&Ar5z9C8qK`AQz1i_(!qF=XH;2QoAA2^38f%)#e3q9FVot_Q zE@37Ej4?rhQ=I!5y}p{oadWyn{PyFQ(WN%lu$X4Gi09{ZVe)EIp8;}onc*1yy}any zcOe_MyocnUHlgDwc?CLnhZC;i6@`xs`lr%^CrDnUCrjRe8pl;h84WUE_KPUPfWOqZe<03$#OMoP@7Y9eAZHL zHp^e%n-^r+cz0c&lTSBa=&g794b;8G-X1GCREughBD#ok1a2?SQ<3pQ1ODgywac!VP%hF-H@aB8H+ahVrdXli={#K(83=9Ekme+0{5!GHC4;$GXMYp literal 0 HcmV?d00001 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3362fe1..bceb964 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: with: file: "./src/docker/8.1/Dockerfile" push: true + platforms: linux/amd64,linux/arm64 tags: "${{env.BUILDKIT_IMAGE}}:8.1" - name: Build and push 8.2 @@ -49,6 +50,16 @@ jobs: with: file: "./src/docker/8.2/Dockerfile" push: true + platforms: linux/amd64,linux/arm64 tags: | "${{env.BUILDKIT_IMAGE}}:8.2" - "${{env.BUILDKIT_IMAGE}}:latest" \ No newline at end of file + "${{env.BUILDKIT_IMAGE}}:latest" + - + name: Build and push 8.2 alpine + uses: docker/build-push-action@v3 + with: + file: "./src/docker/8.2/Dockerfile.alpine" + push: true + platforms: linux/amd64,linux/arm64 + tags: | + "${{env.BUILDKIT_IMAGE}}:8.2-alpine" \ No newline at end of file diff --git a/.github/workflows/manual.yaml b/.github/workflows/manual.yaml index 6875c37..2afbfb6 100644 --- a/.github/workflows/manual.yaml +++ b/.github/workflows/manual.yaml @@ -60,6 +60,7 @@ jobs: with: file: "./src/docker/8.1/Dockerfile" push: true + platforms: linux/amd64,linux/arm64 tags: "${{env.BUILDKIT_IMAGE}}:8.1" - name: Build and push 8.2 @@ -67,6 +68,16 @@ jobs: with: file: "./src/docker/8.2/Dockerfile" push: true + platforms: linux/amd64,linux/arm64 tags: | "${{env.BUILDKIT_IMAGE}}:8.2" - "${{env.BUILDKIT_IMAGE}}:latest" \ No newline at end of file + "${{env.BUILDKIT_IMAGE}}:latest" + - + name: Build and push 8.2 alpine + uses: docker/build-push-action@v3 + with: + file: "./src/docker/8.2/Dockerfile.alpine" + push: true + platforms: linux/amd64,linux/arm64 + tags: | + "${{env.BUILDKIT_IMAGE}}:8.2-alpine" \ No newline at end of file diff --git a/build.sh b/build.sh index 2181309..d980654 100755 --- a/build.sh +++ b/build.sh @@ -8,10 +8,10 @@ fi if [ $tag != 'latest' ] then echo 'Build from from tag' - docker build -f docker/${tag}/Dockerfile -t jkaninda/laravel-php-fpm:$tag . + docker build -f src/docker/${tag}/Dockerfile -t jkaninda/laravel-php-fpm:$tag . else echo 'Build latest' - docker build -f docker/8.2/Dockerfile -t jkaninda/laravel-php-fpm:$tag . + docker build -f src/docker/8.2/Dockerfile -t jkaninda/laravel-php-fpm:$tag . fi diff --git a/docker-compose.yml b/docker-compose.yml index f05d772..71fa3b6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,14 @@ version: '3' services: php-fpm: - image: jkaninda/laravel-php-fpm:latest + image: jkaninda/laravel-php-fpm:8.2 container_name: php-fpm restart: unless-stopped volumes: #Project root - ./laravel:/var/www/html networks: - - default #if you're using networks between containers + - web #if you're using networks between containers #Nginx server nginx-server: image: jkaninda/nginx-fpm:alpine @@ -23,4 +23,7 @@ services: - CLIENT_MAX_BODY_SIZE=20M - PHP_FPM_HOST=php-fpm:9000 networks: - - default + - web +networks: + web: + external: false diff --git a/src/docker/8.2/Dockerfile b/src/docker/8.2/Dockerfile index 82be1e1..b12ef61 100644 --- a/src/docker/8.2/Dockerfile +++ b/src/docker/8.2/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2.5-fpm +FROM php:8.2.8-fpm ARG WORKDIR=/var/www/html ENV DOCUMENT_ROOT=${WORKDIR} ENV LARAVEL_PROCS_NUMBER=1 diff --git a/src/docker/8.2/Dockerfile.alpine b/src/docker/8.2/Dockerfile.alpine new file mode 100644 index 0000000..32dd264 --- /dev/null +++ b/src/docker/8.2/Dockerfile.alpine @@ -0,0 +1,21 @@ +FROM php:8.2-fpm-alpine +ARG WORKDIR=/var/www/html +ENV DOCUMENT_ROOT=${WORKDIR} +ENV LARAVEL_PROCS_NUMBER=1 +ARG HOST_UID=1000 +ENV USER=www-data + +# Install the PHP pdo_mysql extention +RUN docker-php-ext-install pdo_mysql + +# Install Composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# Set working directory +WORKDIR $WORKDIR + +RUN rm -Rf /var/www/* && \ +mkdir -p /var/www/html + +ADD src/index.php $WORKDIR/index.php +ADD src/php.ini $PHP_INI_DIR/conf.d/