Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-docker images should be properly labeled with their native arch #35

Open
truboxl opened this issue Jul 30, 2022 · 10 comments
Open

Comments

@truboxl
Copy link
Contributor

truboxl commented Jul 30, 2022

https://hub.docker.com/r/termux/termux-docker/tags

Currently all the images are labelled as linux/amd64. I think they should be properly fixed so that supposedly they can run on their own native architectures without any Docker warnings.

  1. Though I am not quite settled for:
    arm to use linux/arm or linux/arm/v7 or linux/arm32v7?
    aarch64 to use linux/aarch64 or linux/arm/v8 or linux/arm64 or linux/arm64v8?
    i686 (which is also "latest") to change to linux/i386?

  2. We also need to look into adding busybox that are native to their arches
    The one at https://github.com/termux/termux-docker/blob/4c08c24bceb13cecd1d18153dfddbbf5fe70bb71/system/arm/bin/busybox is currently 32bit arm static binary (checksum cd04052b8b6885f75f50b2a280bfcbf849d8710c8e61d369c533acf307eda064) which based on https://github.com/hazy/google-distroless/blob/master/WORKSPACE#L423 is coming from https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/

@licy183
Copy link
Member

licy183 commented Jul 30, 2022

Yeah, we could tag them using docker buildx and the busybox binaries may need to update. I will try to work on this later.

@lars18th
Copy link
Contributor

So, any idea to run the linux/amd64 image in a Linux x64 machine using the qemu-static?

$ docker run --platform linux/arm64 --rm -it termux/termux-docker:latest
Unable to find image 'termux/termux-docker:latest' locally
latest: Pulling from termux/termux-docker
Digest: sha256:c776b873f88bcdbe446ebf69086cf0d83f2cede1b2de8a3a83c1eb5921870bb4
Status: Image is up to date for termux/termux-docker:latest
WARNING: image with reference termux/termux-docker was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
docker: Error response from daemon: image with reference termux/termux-docker:latest was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64.
See 'docker run --help'.

@licy183
Copy link
Member

licy183 commented Nov 20, 2022

So, any idea to run the linux/amd64 image in a Linux x64 machine using the qemu-static?

$ docker run --platform linux/arm64 --rm -it termux/termux-docker:latest
Unable to find image 'termux/termux-docker:latest' locally
latest: Pulling from termux/termux-docker
Digest: sha256:c776b873f88bcdbe446ebf69086cf0d83f2cede1b2de8a3a83c1eb5921870bb4
Status: Image is up to date for termux/termux-docker:latest
WARNING: image with reference termux/termux-docker was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
docker: Error response from daemon: image with reference termux/termux-docker:latest was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64.
See 'docker run --help'.

See #34 (comment).

@lars18th
Copy link
Contributor

Hi @licy183 ,

See #34 (comment).

I'm running it through the multiarch/qemu-user-static , and this is the error when running it with the command docker run --platform linux/arm64 --rm -it termux/termux-docker:latest. Please, note the parameter "--platform linux/arm64".

Any idea to run the ARM Termux container in a x86_64 box?

@licy183
Copy link
Member

licy183 commented Nov 20, 2022

That's due to the uncorrect platform label as this issue proposed. For example, termux-docker:aarch64 image labels its platform as linux/amd64 although it actually contains the binary file whose target is arm64, so you don't have to pass --platform flag as what you should do to run an aarch64 ubuntu:latest container.
If you want to run an aarch64 container, after setting up qemu-user-static and binfmt_misc, just run docker run --rm -it termux/termux-docker:aarch64.

@lars18th
Copy link
Contributor

lars18th commented Nov 21, 2022

Hi @licy183 ,

Ok. Thank you for the explanation. I allways use the --platform linux/arm64 parameter to silence the warning that appears. In any case I hope you want to change the platform label to overcome these issues.

And... the use of the correct image termux/termux-docker:aarch64 and not the termux/termux-docker:latest.

Regards.

@lars18th
Copy link
Contributor

Hi @licy183 ,

You know when your PR #37 will be merged?

@licy183
Copy link
Member

licy183 commented Nov 26, 2022

Hi @licy183 ,

You know when your PR #37 will be merged?

I forgot that... I will merge it now....

@lars18th
Copy link
Contributor

lars18th commented Dec 2, 2022

Hi @licy183 ,

If the PR is merged and the new images are public in the docker repository, then why not close this issue?

@truboxl
Copy link
Contributor Author

truboxl commented Dec 2, 2022

No 2 is not yet solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants