Add Alpine version, arm64 platform

This commit is contained in:
2023-08-12 08:55:52 +02:00
parent a104a39f9b
commit 08a05bf1bf
7 changed files with 54 additions and 8 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -42,6 +42,7 @@ jobs:
with: with:
file: "./src/docker/8.1/Dockerfile" file: "./src/docker/8.1/Dockerfile"
push: true push: true
platforms: linux/amd64,linux/arm64
tags: "${{env.BUILDKIT_IMAGE}}:8.1" tags: "${{env.BUILDKIT_IMAGE}}:8.1"
- -
name: Build and push 8.2 name: Build and push 8.2
@@ -49,6 +50,16 @@ jobs:
with: with:
file: "./src/docker/8.2/Dockerfile" file: "./src/docker/8.2/Dockerfile"
push: true push: true
platforms: linux/amd64,linux/arm64
tags: | tags: |
"${{env.BUILDKIT_IMAGE}}:8.2" "${{env.BUILDKIT_IMAGE}}:8.2"
"${{env.BUILDKIT_IMAGE}}:latest" "${{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"

View File

@@ -60,6 +60,7 @@ jobs:
with: with:
file: "./src/docker/8.1/Dockerfile" file: "./src/docker/8.1/Dockerfile"
push: true push: true
platforms: linux/amd64,linux/arm64
tags: "${{env.BUILDKIT_IMAGE}}:8.1" tags: "${{env.BUILDKIT_IMAGE}}:8.1"
- -
name: Build and push 8.2 name: Build and push 8.2
@@ -67,6 +68,16 @@ jobs:
with: with:
file: "./src/docker/8.2/Dockerfile" file: "./src/docker/8.2/Dockerfile"
push: true push: true
platforms: linux/amd64,linux/arm64
tags: | tags: |
"${{env.BUILDKIT_IMAGE}}:8.2" "${{env.BUILDKIT_IMAGE}}:8.2"
"${{env.BUILDKIT_IMAGE}}:latest" "${{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"

View File

@@ -8,10 +8,10 @@ fi
if [ $tag != 'latest' ] if [ $tag != 'latest' ]
then then
echo 'Build from from tag' 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 else
echo 'Build latest' 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 fi

View File

@@ -1,14 +1,14 @@
version: '3' version: '3'
services: services:
php-fpm: php-fpm:
image: jkaninda/laravel-php-fpm:latest image: jkaninda/laravel-php-fpm:8.2
container_name: php-fpm container_name: php-fpm
restart: unless-stopped restart: unless-stopped
volumes: volumes:
#Project root #Project root
- ./laravel:/var/www/html - ./laravel:/var/www/html
networks: networks:
- default #if you're using networks between containers - web #if you're using networks between containers
#Nginx server #Nginx server
nginx-server: nginx-server:
image: jkaninda/nginx-fpm:alpine image: jkaninda/nginx-fpm:alpine
@@ -23,4 +23,7 @@ services:
- CLIENT_MAX_BODY_SIZE=20M - CLIENT_MAX_BODY_SIZE=20M
- PHP_FPM_HOST=php-fpm:9000 - PHP_FPM_HOST=php-fpm:9000
networks: networks:
- default - web
networks:
web:
external: false

View File

@@ -1,4 +1,4 @@
FROM php:8.2.5-fpm FROM php:8.2.8-fpm
ARG WORKDIR=/var/www/html ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR} ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1 ENV LARAVEL_PROCS_NUMBER=1

View File

@@ -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/