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/v7 Support? (ready-to-use docker image) #2

Closed
maietta opened this issue Oct 5, 2021 · 12 comments
Closed

ARM/v7 Support? (ready-to-use docker image) #2

maietta opened this issue Oct 5, 2021 · 12 comments

Comments

@maietta
Copy link
Member

maietta commented Oct 5, 2021

This issue opened as a result of a question asked by @markfqs seeking an "off the shelf" solution for the arm/v7 architecture:

See original comment raising the issue: mcuadros/ofelia#137 (comment).

I'm still new to Github's CI/CD tooling for automated Actions in Workflows but I'm pretty sure I can get you a usable product soon. While I do not currently have possession of any device with an ARM Cortex A9 chipset (ARM/v7), I do know that there hosting providers that do provide VPS accounts that use this architecture.

In a quick search, I see that there are example Github workflows for building form ARM/v7. I'll try and see what I can do in the coming days to solve this for you.

So, @markfqs, what kind of device using ARM/v7 version of the ARM Cortex A9 chipset you wish to see support for?

@markfqs
Copy link

markfqs commented Oct 5, 2021

So, @markfqs, what kind of device using ARM/v7 version of the ARM Cortex A9 chipset you wish to see support for?

Well, I'm not totally sure about the architecture naming. My target platform is RaspberryPi2 (ARM 32bits, armhf). I'm not sure which real naming is using docker as I have images reporting architecture as simply 'arm', some arm-v6 and some arm-v7 ;)

However I'm running a swarm cluster composed of RaspberryPi2 and a pair of Allwinners A20 (old BananaPi and a CubieTruck) and all images run well on any node.

I will build an image from your code and let you know the results.

@maietta
Copy link
Member Author

maietta commented Oct 7, 2021

Hey @markfqs, just letting you know I haven't forgotten and will be setting up a branch to test a workflow with support to test and then build for ARMv7. If that's good, then I'll have a docker image available. I've got a project I'm working to get ironed out then I will get to it this evening or sometime tomorrow, Friday Oct 8th.

Update: Major power outage in the area with no ETA. While I do have backup generators, they don't get used unless it's required. I'll provide another update likely by Monday afternoon. (Oct 11th, 2021)

@maietta
Copy link
Member Author

maietta commented Oct 13, 2021

Oct 13th Update:

Until my Raspberry Pi's arrive and I can begin testing, I have started t o look into QEMU to virtualize an ARM processor on my laptop. I'll be playing around with this perhaps today.

https://www.qemu.org/docs/master/system/target-arm.html

@maietta
Copy link
Member Author

maietta commented Oct 22, 2021

Just a follow-up.

I was notified of my package being delayed. I won't be able to test this out for a while. I couldn't find a hosting provider I was willing to give my credit card details to. Once I have the Pi devices in my possession, I'll get back to work on this.

@maietta
Copy link
Member Author

maietta commented Nov 26, 2021

Another follow-up:

The only ARM device I was able to get my hands on in all this time is an ARM/v8, not an ARM/v7. It seems that my luck is terrible with ordering any sort of Raspberry Pi device as I have yet to receive anything I ordered online (it's now been a month and a half). The only reason I have an ARM/v8 device is become someone in my community loaned me one of his Raspberry Pi model 4's with 8GB ram.

Sometime this week I will attempt to test an image for ARM/v8 but this is not what you asked for, @markfqs.

@markfqs
Copy link

markfqs commented Nov 29, 2021

Sorry for my lack of response, Thanks much for you efforts,

I have a RaspPi2 so I have been able to at least 'build/test' chadburn on ARMv7 / Raspberry Pi and check if something special is needed (usually not the case).

Usign this Dockerfile (dockerfile is enough to pull your code), made the trick:

FROM golang:1.17.1-alpine AS builder
RUN /bin/true \
    && apk --no-cache add gcc musl-dev \
    && go get github.com/PremoWeb/Chadburn \
    && /bin/true

FROM alpine:3.14.2
RUN apk --no-cache add ca-certificates tzdata
COPY --from=builder /go/bin/chadburn /usr/bin/chadburn
ENTRYPOINT ["/usr/bin/chadburn"]
CMD ["daemon"]

In a quick search, I see that there are example Github workflows for building form ARM/v7. I'll try and see what I can do in the coming days to solve this for you.

This is what I was really interested in: To just have available image in docker hub registry. I'm not used to github/docker for developer users but I think they offer some kind of 'autobuild and release' workflows to automatically publish image for different architectures.

Let me know how I can help

@maietta
Copy link
Member Author

maietta commented Nov 29, 2021

Excellent.

I'll work to get an autobuild going today or tomorrow and auto-publish to Docker Hub. I'm currently wrapping up a big project.

Thanks!

@maietta
Copy link
Member Author

maietta commented Dec 25, 2021

Confirmed arm/v7 is supported, but I cannot seem to get the images pushed to Docker Hub.

I'm closing this.

@maietta maietta closed this as completed Dec 25, 2021
@markfqs
Copy link

markfqs commented Dec 28, 2021

Hi thanks,

I checked https://hub.docker.com/r/premoweb/chadburn/tags and there is no ARM image in docker hub, although I found one on https://hub.docker.com/r/nickmaietta/chadburn/tags

Could you confirm which is the 'official' image as well as publishing the link in README.md

@theonelucas
Copy link

Confirmed arm/v7 is supported, but I cannot seem to get the images pushed to Docker Hub.

I'm closing this.

Are you on Windows/Mac? If so you can push directly from Docker desktop, on Linux you can docker login and build & push with buildx docker buildx build -t premoweb/chadburn:latest --platform linux/arm64,linux/amd64 --push .

@maietta
Copy link
Member Author

maietta commented Dec 31, 2021

Confirmed arm/v7 is supported, but I cannot seem to get the images pushed to Docker Hub.
I'm closing this.

Are you on Windows/Mac? If so you can push directly from Docker desktop, on Linux you can docker login and build & push with buildx docker buildx build -t premoweb/chadburn:latest --platform linux/arm64,linux/amd64 --push .

Yes, on a Windows 10 machine running WSL2. Sadly, doesn't work from my environment:

$ docker buildx build -t premoweb/chadburn:latest --platform linux/arm64,linux/amd64 --push .
[+] Building 0.0s (0/0)
error: multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

I am slowly working on automated workflows to build and deploy to Docker Hub and Github Container Registry, but for whatever reason, Docker Hub is not getting the built images. Maybe today I'll try tackling this problem again.

I really hope to have a nice update for you soon.

@maietta maietta reopened this Dec 31, 2021
@maietta
Copy link
Member Author

maietta commented Dec 31, 2021

Hi @theonelucas,

Sorry for the wait!

I have completed the changes needed and now have automated builds for 5 different architectures including arm/v7.

The images are available on both Docker Hub and Github Container Registry:

https://hub.docker.com/r/premoweb/chadburn/tags

https://github.com/PremoWeb/chadburn/pkgs/container/chadburn

Also note, you can reference your images in your projects using "latest", tags i.e., v1.0.0 as well as by their commit hashes.

Have a great day. Let me know if this works well for you!

@maietta maietta closed this as completed Dec 31, 2021
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