Can I inform QNAP if my Docker Image is Intel or Arm

大城市里の小女人 提交于 2019-12-12 14:22:00

问题


QNAP ContainerStation supports searching for Docker images on Docker Hub. QNAP ContainerStation is supported on both their Intel and Arm platforms. I have an Intel and an Arm Image of my application, if user searches for image (songkong) both are displayed but of course only the Intel version will work on Intel QNAP and only Arm version will work on Arm QNAP.

It would be better for the customer if QNAP would just list the valid one, since QNAP dont make it very clear what the cpu is for their various models. Is there anything I can add to my Dockerfile, or anything I can within DockerHub repository to help QNAP do this ?

Update

Seems there is someway to create an image that supports multiple platforms (Multi-Arch). I assume what actually happens is you create separate images and then put some wrapper around them, then Docker users platform can automtically pick the correct version for their platform. But cannot see how I combine my Arm and Intel images into a MultiArch Image.


回答1:


If you're using an old version of Docker you have to use manifest-tool. There is a small tutorial in the README.md of the repository or you can also follow this one.

If your Docker version is recent enough, you can directly use the docker manifest command.

Then you can use it that way:

docker manifest create name/app:latest name/app:amd64 name/app:arm64
docker manifest push name/app:latest

Hope that helps.



来源:https://stackoverflow.com/questions/52794668/can-i-inform-qnap-if-my-docker-image-is-intel-or-arm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!