Skip to content

Update Dockerfile

Update Dockerfile #69

Workflow file for this run

name: multiarch_push
on:
push:
branches:
- multiarch
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [linux/amd64, linux/arm64]
include:
- dockerfile: ./compose/local/django/Dockerfile
image: ghcr.io/ldo-cert/orochi_django
- dockerfile: ./compose/local/dask/Dockerfile
image: ghcr.io/ldo-cert/orochi_worker
- dockerfile: ./compose/local/nginx/Dockerfile
image: ghcr.io/ldo-cert/orochi_nginx
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and push multi-platform image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
TARGETPLATFORM=${{ matrix.platform }}
BUILDPLATFORM=${{ runner.os }}