docker-makemkv icon indicating copy to clipboard operation
docker-makemkv copied to clipboard

Multi-Arch Images for e.g. Raspberry Pi

Open peanutbother opened this issue 4 years ago • 1 comments

As the title already states, I'd love to see an arm64 build of this image. There are multiple ways of achieving this, either by using docker's buildx or using travis deployment with a build matrix. The advantage of the first variant would be multi-arch manifest which allows docker to pull the right image for the arch it is running on.

I'd really appreciate to see those images! Also a big thank you for your efforts so far :)

peanutbother avatar Apr 16 '21 19:04 peanutbother

In my eyes, the easiest way would be to create multi-arch builds via GitHub Actions. I have solved this in one of my projects as follows:

name: Build Multi-Arch Docker Image

on:
  push:
    tags: "[1-9]+.[0-9]+.[0-9]+"

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v1 
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - 
        name: Get the version
        id: get_version
        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
      -
        name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          push: true
          tags: |
            docker.io/USERNAME/IMAGE_NAME:latest
            docker.io/USERNAME/IMAGE_NAME:${{ steps.get_version.outputs.VERSION }}
            ghcr.io/USERNAME/IMAGE_NAME:latest
            ghcr.io/USERNAME/IMAGE_NAME:${{ steps.get_version.outputs.VERSION }}

The most important thing is that the base images and any packages and binaries are all available for the corresponding platform. Since I have already used MakeMKV on the PI, I know that it is executable on ARM64.

So if the image jlesage/baseimage-gui is available for ARM64 (if not then configure it too) the remaining effort should remain relatively moderate.

tobiaswx avatar Mar 14 '22 21:03 tobiaswx

The latest image is now multi-arch!

jlesage avatar Feb 13 '23 01:02 jlesage