Automatic multiarch cicd (#517)

Automatic multiarch docker deployment after release (amd64, arm7/8, 386)
This commit is contained in:
Milos Stojanovic
2024-12-13 15:39:21 +01:00
committed by GitHub
parent 999bfa2193
commit 71695b5d47
4 changed files with 43 additions and 4 deletions

View File

@@ -0,0 +1,39 @@
# amd64 only:
# docker buildx build --push --platform linux/amd64 --tag xxx/xxx:latest .
# multiplatform:
# docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386 --tag xxx/xxx:latest .
name: ci-dockerhub-multiarch
on:
push:
tags:
- v*
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.multiarch
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/386
push: true
tags: filegator/filegator:latest-multiarch, filegator/filegator:${{ github.ref_name }}-multiarch

View File

@@ -1,9 +1,9 @@
################################################
# simpler build, no ldap, sftp, s3...
# simpler build from static files, no ldap, sftp, s3...
# build and deploy to docker hub with:
# docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/386 --tag filegator/filegator:vX.X.X-multiarch - < Dockerfile.multiarch
################################################
FROM php:7-apache-buster
FROM php:8.3-apache-bullseye
RUN apt-get update > /dev/null
RUN apt-get install -y git libzip-dev wget unzip

View File

@@ -15,7 +15,7 @@ See `docker-compose-dev.yml` for more informations about configurations and depe
## Project setup for development (Linux)
You must have `git`, `php`, `node (v14)`, `npm`, and `composer` installed.
You must have `git`, `php`, `node`, `npm`, and `composer` installed.
```
git clone https://github.com/filegator/filegator.git