Skip to content

Commit

Permalink
Release 1.0.2 multiarchitecture (#18)
Browse files Browse the repository at this point in the history
* Bumped version number. Removed package version for container and added DL3008 to hadolint ignored warnings/errors list.

* changed github actions references to versions

* added multi architecture build and push in 1 runner (simple to do, but time consuming)
  • Loading branch information
grasdk authored Apr 23, 2024
1 parent 9370ce5 commit c6e38eb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
1 change: 1 addition & 0 deletions .config/hadolint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ignored:
- SC3028
- DL3008
13 changes: 10 additions & 3 deletions .github/workflows/docker-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,30 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5.5.1
with:
images: galette/galette

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@v5.3.0
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,12 @@ Although it's possible to build packages without `dockerd` running, using [`buil
2. Run the build command: `docker buildx build -t galette-local .`
* replace `galette-local` with any name you would like to give your local image

### Building for multiple architecures locally
1. Start the docker daemon if it's not already started: `sudo dockerd`
2. Create a builder-image `docker buildx create --name mybuilder --use --bootstrap` (see "Building with Buildx" [here](https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx/) for more details)
3. Run the build command: `docker buildx build --platform linux/amd64,linux/arm64 -t galette-local .`
* replace `galette-local` with any name you would like to give your local image
* NOTE: The build process is significantly longer than just building for your local architecture.

## Running the docker image locally
1. Follow the same steps as in [How to use this image](./README.md#How-to-use-this-image), replacing the image name `galette/galette:latest` with your local container name, e.g. `galette-local`.
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL maintainer="GrasDK"
# @author GrasDK

LABEL phpversion="8.1"
ARG galetteversion="1.0.1"
ARG galetteversion="1.0.2"
## Plugins versions
ARG plugin_auto_version="2.0.0"
ARG plugin_events_version="2.0.0"
Expand All @@ -32,14 +32,14 @@ ARG plugin_package_url="https://galette.eu/download/plugins/"
RUN a2enmod rewrite
RUN apt-get -y update \
&& apt-get install --no-install-recommends -y \
cron=3.0pl1-162 \
wget=1.21.3-1+b2 \
libfreetype6-dev=2.12.1+dfsg-5 \
libicu-dev=72.1-3 \
libjpeg62-turbo-dev=1:2.1.5-2 \
libpng-dev=1.6.39-2 \
libtidy-dev=2:5.6.0-11 \
tzdata=2024a-0+deb12u1 \
cron \
wget \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libpng-dev \
libtidy-dev \
tzdata \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit c6e38eb

Please sign in to comment.