Skip to content

Multi-Arch container (to run on RaspberryPi) #36

Description

@odin568

Hi @JasperE84 ,
stumbled over this project and is exactly what i need :-)

Anyhow, I run my containers on a RaspberryPi being arm64 architecture. I would like to support in extending github action but I don't see how you so far pushed the containers to dockerhub.

From what I see, this should be quite easily achievable with classical multi stage build like this

name: Docker Image CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - 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: Login to Docker Hub
      uses: docker/login-action@v3
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_TOKEN }}

    - name: Build and push multi-arch image
      uses: docker/build-push-action@v6
      with:
        context: .
        file: ./Dockerfile
        platforms: linux/amd64,linux/arm64
        push: true
        tags: |
          docker.io/${{ secrets.DOCKERHUB_USERNAME }}/pyfusionsolardatarelay:latest
          docker.io/${{ secrets.DOCKERHUB_USERNAME }}/pyfusionsolardatarelay:${{ github.sha }} # example

Thanks for feedback :-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions