Open zhangyoufu opened 4 years ago
HI @zhangyoufu Thank you for showing the suggestion and the example with GitHub Actions.
Currently, there are following some documents about the images with (Travis) CI. How can we improve it? The pull-request is welcome.
I think adding your GitHub Actions example to the examples.md
's links improves it.
Do you have a GitHub repository to test multiarch docker image with GitHub Actions CI?
In README.md
,
Please see the example - junaruga/ci-multi-arch-test i386 case on Travis CI. ... In See Examples & articles.
In examples.md
linked from the "Examples & articles".
junaruga/ci-multi-arch-test and the Travis CI
FTR, in dbhi/qus, ~15 different procedures to use these resources in CI are explained and tested, both on GitHub Actions and on Travis. See the complete list of tests: https://github.com/dbhi/qus/blob/master/docs/tests.md
For a more straightforward and easier to understand example, in repo dbhi/docker, qus is used to build and publish multiarch/manifest images. See https://github.com/dbhi/docker/blob/master/.github/workflows/push.yml (L44-L45 and L66-L67).
I think it worth mention in README, that Docker Hub and QEMU have different notion of architecture.
This is not only related to Docker and QEMU, but different distributions use different names too. Unlike this repo, where static binaries from Fedora are used, in qus binaries from Debian or Fedora are available. Some architecture names do not match or only a subset is available on one of the distributions. See https://github.com/dbhi/qus/blob/master/run.sh#L66-L116 for a glimpse of what is considered equivalent in the context of qus.
Here is how I use multiarch/qemu-user-static
on GitHub Actions: https://github.com/martin-g/haproxy/blob/feature/test-aarch64-on-github-actions/.github/workflows/aarch64.yml
and here is on CircleCI: https://github.com/varnishcache/varnish-cache/tree/master/.circleci
@martin-g, note that you don't need sudo
on GHA. The runner seems to be in group docker
. See https://github.com/dbhi/docker/blob/master/.github/workflows/push.yml#L67 and https://github.com/dbhi/docker/runs/789862140?check_suite_focus=true#step:3:36.
Is this a bug report, feature (enhancement) request or question? (leave only one on its own line)
/kind enhancement
Description:
I think it worth mention in README, that Docker Hub and QEMU have different notion of architecture. And I found that by abusing docker volume, I can register a single qemu-user-static binfmt_misc entry easily.
I came up with GitHub Actions workflow like this: