-
Notifications
You must be signed in to change notification settings - Fork 414
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
aarch64 support is not correct in the Makefile #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess adding arm v7 support would also make sense (probably in a different PR).
I think something like goreleaser would be great for this project.
@sagikazarmark At first, I made this PR with v7 support, but I realized that it could have a backward compatibility issue. Try creating the Dockerfile I put here in this issue, and build it for armhf, running this command: docker buildx build \
--pull \
--push \
--tag ${DOCKER_USER}/buildx-arm:latest \
--platform linux/armhf \
--file Dockerfile \
. Now, try to run the following command: docker rmi ${DOCKER_USER}/buildx-arm:latest
docker run --rm --platform linux/armhf ${DOCKER_USER}/buildx-arm:latest It will result:
As you can see, the docker builds armhf for v7 and not v6, as it is in the source code: Line 27 in 9ce2e80
Thus, how do we solve this by avoiding backward compatibility breaks? It would be another bug (it should be v7 instead of v6 on the 27th line)? |
Hi @kaissi - could you provide any kind of guidance on this PR and availability of dockerize on arm64? I am the chairman of the EdgeX Foundry open source project. Our project discovered your tool and have already incorporated it into some of our work. As we run/support both Intel and ARM64 architectures, it would be incredibly helpful if the ARM64 version was made available soon. |
Hi @jpwhitemn. It's very simple to make these changes. But, first, you could try using some of the other arm executables:
I'm saying that because in my Raspberry Pi 4, these two options work perfectly. That said, let's go to this PR. While this PR is not merged you can do this by yourself. I'm assuming you are trying to execute the stable version - tag v0.6.1 (the latest right now). Where you find ${GITHUB_USER}, you must put your Github user, like 'jpwhitemn', for instance. Just follow these steps:
git clone [email protected]:${GITHUB_USER}/dockerize.git
cd dockerize
git checkout -b 0.6.x v0.6.1
git add --all
git commit -m "Added arm64 support"
git push origin 0.6.x
make release
After doing these steps you can use your Github URL in your projects. |
thanks for this @kaissi . We were able to get things to work, but we were looking for formal acceptance of your PR and to know when this project might actually release again (last was March 2018)? Probably more of a question for @jwilder . We're trying to understand if this project is active or no longer supported. |
@jpwhitemn, related to acceptance of this PR only @jwilder can do it. And, if this project is active, see #120 (comment). |
Hello any update for this PR ? ping @jwilder |
Hello any update for this PR ? ping @jwilder |
Hello any update for this PR ? ping @jwilder |
@ jwilder, I have also tried with these steps mentioned in the issue
In the dockerize git repo the binaries are released for armel and armhf. By running the above steps, the arm64 binaries got built successfully. So, could you please release the binaries for arm64 architecture. Please let me know if you need any help in releasing the arm64 binaries. Could you please merge this PR, it would be really helpful. Thanks in advance! |
Fixed #143 and #154
The aarch64 support is not correct in the Makefile.
dockerize/Makefile
Line 28 in 9ce2e80
dockerize/Makefile
Line 39 in 9ce2e80
The aarch64 value in these two lines should be arm64. The aarch64 value is not a valid GOARCH value. Trying to execute
make dist
will get an error.A practical example is making a multi-platform build of a Dockerfile using arm64 and aarch64 values:
All these Dockerfile arguments are automatically filled when using BuildKit. Also, remember to put your user in ${DOCKER_USER}.
The build result is:
Running this image:
It will result:
If you change the buildx parameter
--platform linux/arm64
to--platform linux/aarch64
, the build result will be the same:and the result of running this image will be the same too:
Even though the results are the same with aarch64 and arm64, GOARCH doesn't recognize the aarch64 value. That is the reason to use arm64 in that two lines of the Makefile.