dfoxg / kratos-admin-ui

A simple Admin-Interface for ory/kratos
MIT License
131 stars 28 forks source link

ARM compatible docker image #159

Closed nmapx closed 5 months ago

nmapx commented 5 months ago

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 commented 5 months ago

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

nmapx commented 5 months ago

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

dfoxg commented 5 months ago

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

nmapx commented 5 months ago

I see, well CI/CD pipelines sucks when it comes to dry-run/debug ๐Ÿ˜“ https://github.com/docker/build-push-action/issues/276 it's a similar use case for some reason the variable we are using here is not accessible/empty

nmapx commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

@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 commented 5 months ago

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 commented 5 months ago

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.

nmapx commented 5 months ago

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 https://github.com/nodejs/docker-node/issues/1829

dfoxg commented 5 months ago

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 commented 5 months ago

It is working ๐ŸŽ‰

dfoxg commented 5 months ago

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