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 compatible docker image #159

Closed
nmapx opened this issue Apr 5, 2024 · 13 comments
Closed

ARM compatible docker image #159

nmapx opened this issue Apr 5, 2024 · 13 comments
Assignees

Comments

@nmapx
Copy link
Contributor

nmapx commented Apr 5, 2024

Hi @dfoxg
Do you plan to add arm64 compatible docker image to public registry?
IMO it should be plug&play. I will be happy to help if you need anything.
Cheers!

@dfoxg
Copy link
Owner

dfoxg commented Apr 5, 2024

It wasn't planned until now, but I will have a look at it :)
PRs are welcome 😛

@nmapx
Copy link
Contributor Author

nmapx commented Apr 6, 2024

@dfoxg done, please check if it looks good to you

@dfoxg
Copy link
Owner

dfoxg commented Apr 6, 2024

@nmapx hm still doesn't work. I will have a look at it later, I'm not at home right now :)

@nmapx
Copy link
Contributor Author

nmapx commented Apr 6, 2024

I see, well CI/CD pipelines sucks when it comes to dry-run/debug 😓
docker/build-push-action#276 it's a similar use case for some reason the variable we are using here is not accessible/empty

@nmapx
Copy link
Contributor Author

nmapx commented Apr 6, 2024

I suspect the release workflow might work fine because the variable is directly declared there
Look at the issue linked above

...
            -
                name: What
                run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
...
                name: Build and push
                uses: docker/build-push-action@v2
                with:
                    context: ./docker
                    file: ./docker/Dockerfile
                    platforms: linux/amd64,linux/arm64,linux/386
                    push: true
                    tags: splitbrain/dokuwiki:${{ env.BRANCH }}
...

Maybe GITHUB_SHA is not accessible and we need to rewrite it in order to use it in the build-push-action plugin configuration?

@dfoxg
Copy link
Owner

dfoxg commented Apr 7, 2024

I rewrote the tag-logic, i hope it will work now. but the build is running for 30mins now 😒

Could you test the pushed image, when the build finishes?

@nmapx
Copy link
Contributor Author

nmapx commented Apr 7, 2024

@dfoxg awesome news! I will check it right away :)
Usually cross platform builds aren't significant slower - it's a standard build time * number of platforms.
I guess Github is the reason here - they must have limited the performance to keep the costs down.

@nmapx
Copy link
Contributor Author

nmapx commented Apr 7, 2024

Isn't the build stuck on linux/arm/v7? This might be an npm issue.
I wouldn't worry about armv7 now - it's a niche.

@dfoxg
Copy link
Owner

dfoxg commented Apr 8, 2024

Isn't a raspberry pi a non 64bit arm per default? I thought my rpi 4 was a armv7, but I was able to enable arm64.

@dfoxg dfoxg self-assigned this Apr 8, 2024
@nmapx
Copy link
Contributor Author

nmapx commented Apr 8, 2024

Raspberry Pi is one of the devices that might have armv7 or even v6 if we consider older generations.
Anyway most of the devices (Mac Books, servers) are using arm64 and I would focus on those. Of course it would be cool to have all of the platforms supported but for some reason npm doesn't like armv7 :D
nodejs/docker-node#1829

@dfoxg
Copy link
Owner

dfoxg commented Apr 8, 2024

Thanks for linking that issue! I removed the arm/v7-Version and now the build works. I currently test to restore the former format, but you could test the image https://github.com/dfoxg/kratos-admin-ui/pkgs/container/kratos-admin-ui/201104529?tag=sha-81e3a1f.

If this works in your setup, i´m gonna create a new release :)

@nmapx
Copy link
Contributor Author

nmapx commented Apr 8, 2024

It is working 🎉

@dfoxg
Copy link
Owner

dfoxg commented Apr 9, 2024

New version is released, thanks for your help! 😍
https://github.com/dfoxg/kratos-admin-ui/releases/tag/v2.3.1

@dfoxg dfoxg closed this as completed Apr 9, 2024
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

2 participants