Closed guyarb closed 8 months ago
Hey @guyarb,
That is absolutely possible, yet I don't have a machine to test that. Is that something you'd be willing to do? Let me know if you need anything.
Sure! once there is an image I can test it
Hey @guyarb,
Run these commands on your machine to see if the resulting image works for you. Considering that you have Go 1.22 installed and available on your $PATH
:
git clone git@github.com:mostafa/xk6-kafka.git && cd xk6-kafka
mkdir dist
go install go.k6.io/xk6/cmd/xk6@latest
GOOS=linux GOARCH=arm64 xk6 build --output dist/xk6-kafka_v0.23.1_linux_arm64 --with github.com/mostafa/xk6-kafka@v0.23.1=.
docker build --platform linux/arm64 --build-arg "VERSION_TAG=v0.23.1" --tag xk6-kafka:v0.23.1 .
docker image inspect $(docker images -q xk6-kafka) | jq '.[] | .Architecture' # SHOULD PRINT "arm64"
docker run --rm -i xk6-kafka:v0.23.1 run - <scripts/test_json.js # THIS SHOULD WORK
If all the above commands work as expected on your machine, I'll merge this PR and release a multi-platform image that you can use.
Hey @mostafa, I've tested it on my ARM machine and it worked fine.
I just used the following command: docker build --platform linux/arm64 --build-arg "VERSION_TAG=v0.23.1" --build-arg "K6_BINARY=dist/xk6-kafka_v0.23.1_linux_arm64" --tag xk6-kafka:v0.23.1 .
instead of your original one
@guyarb
Forgot to mention that you should also switch to the branch to test the changes. But that's okay. I'll try to release a version to see if it works. If not, I'll fix it and release another version.
@guyarb @DanielLavie Now the arm64 image is available on Docker Hub. Please test it.
@mostafa amazing, we tested it and it works Thank you for the taking care of it 🙇🏻
@guyarb Perfect! Glad it was helpful.
The current docker image does not support arm hosts Is it possible to make the docker image supported both arm and amd for linux?