stanford-oval / genie-server

The home server version of Almond
Apache License 2.0
266 stars 42 forks source link

Workflow for the automatic creation of armv8 and amd64 docker images #298

Open hvalev opened 2 years ago

hvalev commented 2 years ago

Problem: At present, there is no docker image for armv8/arm64/aarch64 architectures. A fairly sizable target for the genie-server are SBCs (Single Board Computers) such as Raspberry Pi/Orange Pi and others which are based on the ARM architecture as mentioned in https://github.com/stanford-oval/genie-server/issues/228. This PR addresses that.

Solution: The following workflow file leverages Github Actions and GitHub infrastructure to (semi-)automatically build and push docker images to docker hub for both arm64 and amd64 architectures. On the client side, docker can detect and pull the image of the appropriate architecture. A build-log of a test-run of this workflow can be found here here and the respective built docker images here.

Important: At present, this PR is a POC and is not ready to be merged as the workflow is manually triggered and pushes docker images with the :latest tag only. If this PR is positively perceived, I can adapt it to be triggered on commits where docker images are pushed with the tags :commit-hash and :latest or alternatively be triggered on new releases with tags :release_version and :latest. Alternative approaches are also welcome. A necessary input for this workflow to execute are the addition docker hub username and password as repository secrets (and optimally, a docker hub token, which can be used to update the docker hub image description using that in the github repository as accomplished here).