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

ARM Docker image #22

Closed
TheGreatestJannet opened this issue Nov 2, 2020 · 22 comments
Closed

ARM Docker image #22

TheGreatestJannet opened this issue Nov 2, 2020 · 22 comments

Comments

@TheGreatestJannet
Copy link
Contributor

TheGreatestJannet commented Nov 2, 2020

Would it be possible to have an ARM docker image so that users on raspberry pi or other ARM boards could install and run it?

@TheConnMan
Copy link
Owner

@TheGreatestJannet would you be willing to put together a Dockerfile based on a Node 12 ARM image? You can PR it in as Dockerfile-ARM. You can use all the same commands as in https://github.com/TheConnMan/docker-hub-rss/blob/dev/Dockerfile.

@TheGreatestJannet
Copy link
Contributor Author

TheGreatestJannet commented Nov 7, 2020 via email

@TheConnMan
Copy link
Owner

Would you like to know how? I can walk you through the steps if you're interested in learning.

@TheGreatestJannet
Copy link
Contributor Author

TheGreatestJannet commented Nov 12, 2020 via email

@TheConnMan
Copy link
Owner

Cool. Are you on Windows, Mac, or Linux? Local dev steps will be dependent on that. Check out https://www.docker.com/blog/multi-arch-images/ for how to set up your local Docker instance for muli-arch building.

@TheGreatestJannet
Copy link
Contributor Author

I am on Arch Linux. I have installed docker from the repo but when I run docker buildx ls I get:

docker buildx ls
docker: 'buildx' is not a docker command.
See 'docker --help'

@TheConnMan
Copy link
Owner

Hey @TheGreatestJannet, sorry for the delay on this. I'll get back to you this weekend.

@TheConnMan
Copy link
Owner

@TheGreatestJannet From what I can tell arm builds are no longer experimental, so that's why buildx isn't working for us.

I found a comparable ARM version of the Node base Docker image in https://hub.docker.com/layers/arm64v8/node/12-alpine/images/sha256-c6a9e3164795cf83d3f480142fdb8ab4e9584f7b561e8018ed378454163aa236?context=explore (reference https://github.com/docker-library/official-images#architectures-other-than-amd64). This means we should be able to create a new Dockerfile-arm file which uses this new image instead of the arm64v8/node:12-alpine in the From statement of the current Dockerfile (https://github.com/TheConnMan/docker-hub-rss/blob/dev/Dockerfile#L1).

Once you have the new Dockerfile-arm we'll need to add it to the Travis CI build. Take a look at https://github.com/TheConnMan/docker-hub-rss/blob/dev/.travis.yml#L11. That's where Travis CI builds the current Dockerfile. Add another line below building your new Dockerfile-arm. Check out https://docs.docker.com/engine/reference/commandline/build/#options for a docker build flag to specify the new Docker file.

Finally, once you've additionally built your ARM-based image you'll need to push it. See the after_success section of the Travis file (https://github.com/TheConnMan/docker-hub-rss/blob/dev/.travis.yml#L16) and add new commands to push your ARM version with new tag names.

Good luck!

@TheGreatestJannet
Copy link
Contributor Author

Most raspberry pi's are running arm32 OSes not arm64. Also do I replace FROM node:12-alpine with FROM arm64v8/node:12-alpine for example?

@TheConnMan
Copy link
Owner

I see. Check out arm32v7/node, looks to be a 32 bit version. Yes, that's the correct change to the FROM line. Use the 32 bit version I referenced above.

@TheGreatestJannet
Copy link
Contributor Author

TheGreatestJannet commented Nov 30, 2020

Hi I have my docker file: TheGreatestJannet@e0021cf but I'm a bit confused about the next part. Would I add - docker build -t theconnman/docker-hub-rss -f Dockerfile-armv7 .?

Also for pushing the image can't everything be under the same tag such as latest? See this project for example: https://hub.docker.com/layers/bitwardenrs/server/latest/images/sha256-ed89e52078a02fe4c0d04ef2fcaab8c9f01db05aa29e73d6e41440ec69a50285?context=explore they have the amd64, armv7, arm64v8 etc all under the same latest tag.

@TheConnMan
Copy link
Owner

Your Dockerfile and build command look great.

Honestly I'm not sure, I didn't think that was possible... Yet the repo you link to shows that the latest tag does have multiple architectures. If you can figure it out I'm happy to take another PR! However I think what you've got will work.

Add your additional build command to the Travis file and then you can open a PR.

@TheGreatestJannet
Copy link
Contributor Author

Looks like it didn't build correctly.

@TheConnMan
Copy link
Owner

Yes, unfortunately it did. I did some tweaking of the Travis file and got it to work!

@TheGreatestJannet
Copy link
Contributor Author

Thanks a lot!

@TheGreatestJannet
Copy link
Contributor Author

TheGreatestJannet commented Jan 1, 2021

Will there be a latest image or only a latest-dev image?

@TheConnMan
Copy link
Owner

There will be a latest-arm7. It's building now. I just released v0.4.0.

@TheGreatestJannet
Copy link
Contributor Author

Thank works perfectly! In ARM64 image might be worth while for some users though but I'll close this issue for now! Thanks a lot for your help!

@TheConnMan
Copy link
Owner

Thank you for contributing!

@chessmango
Copy link

This is closed but I just wanted to comment on how lovely an interaction this was! Thanks so much @TheConnMan @TheGreatestJannet for your education and contribution respectively 🙂

@chessmango
Copy link

For what it's worth as well, there's a decent write-up about image pipelines and meta tags here: https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/

And specifically: https://github.com/linuxserver/pipeline-triggers

@TheConnMan
Copy link
Owner

@chessmango that's very kind of you! Thanks for sharing the positivity.

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