Skip to content

Commit

Permalink
fix multi-arch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPaglusch committed Feb 14, 2024
1 parent 5a1edc6 commit 73c79f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ jobs:
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
strategy:
matrix:
include:
- dockerfile: Dockerfile
platform: linux/amd64
- dockerfile: arm.Dockerfile
platform: linux/arm64/v8

steps:
- name: Checkout repository
Expand Down Expand Up @@ -69,15 +62,25 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
file: docker/${{ matrix.dockerfile }}
file: docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v6
- linux/arm/v7
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ https://flashpaper.io
4. Set up a reverse-proxy in front of FlashPaper that terminates SSL/TLS

#### Building an Image
You can build your own image using the provided Dockerfile in the `docker/` folder. There are currently two:
- For x86_64 (`docker/Dockerfile`)
- For ARM64 (`docker/arm.Dockerfile`)
You can build your own image using the provided Dockerfile in the `docker/` folder.

In order to build FlashPaper, run `docker build . -t flashpaper -f docker/Dockerfile`. If you would like to build FlashPaper for a different CPU architecture, replace `docker/Dockerfile` with the appropriate Dockerfile.
You can also build via docker-compose by replacing the `image:` line in [docker-compose.yml](https://github.com/AndrewPaglusch/FlashPaper/blob/master/docker-compose.yml) with the following (make sure to choose the Dockerfile for your architecture):
Expand Down
24 changes: 0 additions & 24 deletions docker/arm.Dockerfile

This file was deleted.

0 comments on commit 73c79f9

Please sign in to comment.