-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Container image build for ARM + semantic tags #386
Conversation
Hey @rhtenhove, thanks a lot for these improvements! The docker setup has always bugged me but I've never quite found the time to come back to it and sort it out. Really appreciate the work here. I've had a look through and don't see anything concerning so I say lets do it. Once I have some time (probably tonight) I'll come back to this, merge and release a new version to make sure all is working as expected. |
@rhtenhove I've made a release and things look good from a first glance: |
Awesome! Just gave it a go on an ARM machine, and it works perfectly fine! ~> docker run --rm --entrypoint "" ghcr.io/tomwright/dasel:2-alpine sh -c "uname -a && dasel --help"
Linux 2d2b6311abe2 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:26:57 UTC 2024 aarch64 Linux
Select properties from the given file.
Usage:
dasel -f <file> -r <json,yaml,toml,xml,csv> <selector> [flags]
dasel [command]
... Just noticed ghcr shows the architecture Thanks for merging! Glad I can now use the container on ARM! |
Thanks for the info, I'll put it on my todo list 😄 |
Wanting to use your tool on an ARM machine using the container image was impossible (without building my own image) because currently it only builds for amd64. Trying to add ARM made me realize the container image build process was much too complex.
So this PR moves everything-container to a separate workflow file, and attempts to greatly simplify it, while adding awesome features. These are:
ghcr.io/tomwright/dasel:2-alpine
) to follow development while preventing breaking changes. This assumes you ensure no breaking changes are introduced within a major version.dasel
is now built within the container image build process, so the OS and architecture will always match the containerThis introduces some changes which are important to be aware of
Dockerfile
which uses variables to either target debian (default) or alpine (or other OSes if so desired).v
is pushed. Furthermore, a version parsing step ensures only semantic version tags get pushed to the registry.v
. It does however keep thevx.x.x
just as you pushed the images before. These tags all reference the same image, so they won't take up any resources other than a pointer.CMD
--help
so when the container is run without any arguments, the help is shown. I don't believe there are any scenarios where having no arguments will be useful, but I may be wrong.All steps have been tested, except for the registry authentication and pushing to that registry as only you have access to that.