karlderkaefer / cdk-notifier

CLI tool to post AWS CDK diff as comment to Github pull request
MIT License
122 stars 7 forks source link

Arm64 docker image are not working, because they contain a x64 binary #160

Closed holomekc closed 6 months ago

holomekc commented 6 months ago

Hi,

it looks like that you build the binary once on a ubuntu machine and then push the docker image for both platforms. This results in the issue:

exec /bin/cdk-notifier: exec format error

The release in GitHub itself looks fine though.

karlderkaefer commented 6 months ago

Thanks for report I will check today

karlderkaefer commented 6 months ago

the issue is explaining here It's probably the cache. Either I remove cache or I use matrix build to build every docker image on separate platform or I check again the cross-compile multi-platform docker guide according to this guide it seems I did not use the target platform and also miss GOOS and GOARCH

BUILDPLATFORM — matches the current machine. (e.g. linux/amd64)
BUILDARCH — e.g. amd64, arm64, riscv64
TARGETPLATFORM — The value set with --platform flag on build
TARGETOS - OS component from --platform, e.g. linux
TARGETARCH - Architecture from --platform, e.g. arm64
karlderkaefer commented 6 months ago

@holomekc please can you verify and let me know if it's working? I currently have no arm64 at hand just tested on emulated environment docker run --rm karlderkaefer/cdk-notifier:2.12.4 --help

holomekc commented 6 months ago

Hi @karlderkaefer,

thx for the quick fix. Yes it works fine now!