diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..cef791a Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3362fe1..9ac58c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,13 +22,6 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push 7.4 - uses: docker/build-push-action@v3 - with: - file: "./src/docker/7.4/Dockerfile" - push: true - tags: "${{env.BUILDKIT_IMAGE}}:7.4" - name: Build and push 8.0 uses: docker/build-push-action@v3 @@ -42,6 +35,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 +43,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/