You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
No ARM64 image available on Docker Hub. Only AMD64 is published.
Solution:
This can be solved with Docker Buildx which builds several images for different architectures. So in your case it should be something similar to
Motivation:
Apple Macbook with M1 chip are becoming more prevalent. These machines do not use your typical Intel CPU but are rather ARM based. Apple sees Intel as legacy and as time passes by those machines will be phased out in favour of ARM.
Note: By Intel I mean x86-64 or x64 or x86_64 or AMD64 or Intel 64. Note: By ARM I mean ARMv8 or ARM64 or AArch64.
the question is whether docker hub supports that, which I can't tell. Do you?
OT: As of now we can't use the broken openssl 1.0.2. I wasn't able to compile this for M1. This is in general no problem as macOS comes with LibreSSL which we can use as a vehicle for the cases needed.
Yes, Docker Hub does support it so you can push multiple architectures. For example see OS/ARCH column for alpine.
The Docker on MacOS runs inside a Linux Virtual Machine, so what ships with MacOS won't interfere.
I forgot to mention that once you build and push then this will work on Raspberry Pi 3 and 4 as well as those machines are ARM64 based.
@drwetter I can confirm that the GHCR version works on ARM, although it offers less/different tags than on Dockerhub)
I ran it like this: docker run --rm -it ghcr.io/drwetter/testssl.sh
I lack currently a bit of time, but I had a quick look at the encrypted secrets page. From the security architecture perspective I am still wondering why one should handover + store passwords which is under other circumstances a "no, don't ever do that". Encrypting the password with another secret -- if understood that correctly -- doesn't make it better as I trust github to store that properly and there will never be flaws in the github workflow.
@drwetter This part might be a bit misleading in their docs, I don't assume you'll enter your "personal" username + password into the GitHub secrets (which indeed would be "icky"), but rather an access-token for this purpose, which can be revoked in case there is a problem at Github or you just want to stop using them for whatever reason. You can do that in dockerhub here: https://hub.docker.com/settings/security
@eins78 : That token seem to want read / write / delete access to docker hub.
Currently it works that as soon as there is a push to one of the branches here (github), dockerhub just automatically builds the image. No credentials/token or whatsoever involved.
I do not get why this image is amd64 only and whether this repo can do something to provide instructions for dockerhub to build other archs -- maybe with tags in the Dockerfile like FROM <ARCH>/alpine:<VERSION> or any TARGETPLATFORM or by any other means?
That would be my first choice.
PS: in the UX at dockerhub there was no setting where I could set the architecture. Albeit the UX is gruesome it looks like I didn't overlook such a setting.
How? The UI still kinda sucks as years ago and there's no button for adding an architecture. And I am not an expert for docker hub and would need some good docs which I can follow or an expert which did that and can give me a hand.
Activity
drwetter commentedon Jan 13, 2022
Hi @vahidshirvani ,
the question is whether docker hub supports that, which I can't tell. Do you?
OT: As of now we can't use the broken openssl 1.0.2. I wasn't able to compile this for M1. This is in general no problem as macOS comes with LibreSSL which we can use as a vehicle for the cases needed.
vahidshirvani commentedon Jan 13, 2022
Yes, Docker Hub does support it so you can push multiple architectures. For example see OS/ARCH column for alpine.
The Docker on MacOS runs inside a Linux Virtual Machine, so what ships with MacOS won't interfere.
I forgot to mention that once you build and push then this will work on Raspberry Pi 3 and 4 as well as those machines are ARM64 based.
drwetter commentedon Jan 14, 2022
We could need a hand here
jauderho commentedon Jan 14, 2022
@drwetter I do not have a Docker Hub paid account so I do not know if the build process there can support multi-platform builds. BUT the action that I built for you does already push multi-platform to GHCR. Those can be found here: https://github.com/drwetter/testssl.sh/pkgs/container/testssl.sh
This might be a reason why you want to use GH to build the images then push to both Docker Hub and GHCR as I previously suggested.
@vahidshirvani You can use the link I shared above or if you must use Docker Hub, I do have images here: https://hub.docker.com/r/jauderho/testssl.sh/tags
drwetter commentedon Jan 15, 2022
Ok, thanks.
Your images stem from GHA pushes or how do you get the platforms in there?
jauderho commentedon Jan 16, 2022
@drwetter I push from GHA to Docker Hub and GHCR.
See https://github.com/jauderho/dockerfiles/blob/main/.github/workflows/age.yml (lines 51 - 64) for an example.
vahidshirvani commentedon Apr 4, 2022
Thank you for your answers. I helped me. I will close this issue.
drwetter commentedon Apr 4, 2022
I still have headaches (security-wise) hard-wiring access tokens in Github from Docker. There have been issues in the past.
If anyone can give me a hand how to convince dockerhub to supply other architectures that would be great.
drwetter commentedon Sep 21, 2022
I could need a hand here.
If there's a way w/o hard-wiring access tokens here
tenjaa commentedon Nov 15, 2022
The GHCR image already offers an ARM build.
Why not link it in the readme instead of the dockerhub one?
eins78 commentedon Nov 22, 2022
@drwetter I can confirm that the GHCR version works on ARM, although it offers less/different tags than on Dockerhub)
I ran it like this:
docker run --rm -it ghcr.io/drwetter/testssl.shIf you still want to publish to Dockerhub from GH Actions, here are the official docs on how to configure the authentication in a secure way using "secrets": https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
drwetter commentedon Nov 22, 2022
Thanks @tenjaa and @eins78 .
I lack currently a bit of time, but I had a quick look at the encrypted secrets page. From the security architecture perspective I am still wondering why one should handover + store passwords which is under other circumstances a "no, don't ever do that". Encrypting the password with another secret -- if understood that correctly -- doesn't make it better as I trust github to store that properly and there will never be flaws in the github workflow.
Do I understand something wrong?
eins78 commentedon Nov 22, 2022
@drwetter This part might be a bit misleading in their docs, I don't assume you'll enter your "personal" username + password into the GitHub secrets (which indeed would be "icky"), but rather an access-token for this purpose, which can be revoked in case there is a problem at Github or you just want to stop using them for whatever reason. You can do that in dockerhub here: https://hub.docker.com/settings/security
drwetter commentedon Nov 25, 2022
@eins78 : That token seem to want read / write / delete access to docker hub.
Currently it works that as soon as there is a push to one of the branches here (github), dockerhub just automatically builds the image. No credentials/token or whatsoever involved.
I do not get why this image is amd64 only and whether this repo can do something to provide instructions for dockerhub to build other archs -- maybe with tags in the Dockerfile like
FROM <ARCH>/alpine:<VERSION>or anyTARGETPLATFORMor by any other means?That would be my first choice.
PS: in the UX at dockerhub there was no setting where I could set the architecture. Albeit the UX is gruesome it looks like I didn't overlook such a setting.
drwetter commentedon Nov 25, 2022
Maybe somebody can add a section
### From GitHub Container Registryto Dockerhub.md accordingly?That would be much appreciated!
mschfh commentedon Dec 17, 2024
@drwetter How are the Docker Hub images currently published?
It might be enough to also log into the Docker Hub Registry as well and add it to the
build-push-actiontags:https://github.com/drwetter/testssl.sh/blob/3.2/.github/workflows/docker-3.2.yml#L62-L63
drwetter commentedon Dec 17, 2024
How? The UI still kinda sucks as years ago and there's no button for adding an architecture. And I am not an expert for docker hub and would need some good docs which I can follow or an expert which did that and can give me a hand.
Even a research yields not a document like "this-is-it" / "how-you-properly-do-it". Only workarounds like https://medium.com/@life-is-short-so-enjoy-it/docker-how-to-build-and-push-multi-arch-docker-images-to-docker-hub-64dea4931df9 .
PS: And they signaled increased fees for next year.
mschfh commentedon Dec 17, 2024
It should just require another
docker/login-actionstep as documented:Afterwards the Docker Hub tags need to be added to the parameter list of
docker/build-push-action:See also:
Docker Hub should automatically discover the architectures for multi-arch images, I'm not aware of any button/requirement to manually add it.
drwetter commentedon Dec 17, 2024
been through that, discussed it.
I don't like to hand over the login to github for now. This is security wise a bad idea.
That maybe reconsidered if I have time next year to move this repo to https://github.com/testssl along with readjustments on the dockerhub side.
drwetter commentedon Apr 6, 2025
see #2729 / #2730