Closed day1118 closed 1 year ago
Hey @day1118, thanks for the PR! Is there any particular use case you had in mind for this? I've generally intended for kube-capacity to be a standalone cli tool. I'm not sure how helpful a Docker image would be for this.
Is there any particular use case you had in mind for this?
TLDR: It means that the kube-capacity
can be run from any machine without having to install anything other than docker, making it very portable.
Hi @robscott
I have shifted to using almost all cli tools from within docker. Some examples include gcloud
, helm
, kubectl
, jq
, kube-linter
, kubescore
etc. If you create a simple docker compose file for any of those clis, you only need to prepend docker-compose run
to a command and it will run within a container. (eg docker-compose run kube-capacity --pods --util
)
I find this great as my team do no need to install any tools, and you can change version back and forth very easily.
I'd love this option for kube-capacity
also, and hope that you will consider automating the container build and pushing it to Dockerhub too! I'd be happy to help you set this up if you'd like.
Hi @robscott Any thoughts on merging this? Thanks
Hey @day1118, thanks for the reminder! Unfortunately I don't have the time to set up (and more importantly maintain) a Docker registry for this image. I am open to including a Dockerfile in the repo though. To minimize maintenance and potential vulnerabilities, I'd prefer an image with a distroless base though.
That makes sense - I do find that distroless can be quite frustrating to troubleshoot etc as you don't have a shell, but it is your project after all.
Yeah I completely get that, I've just been on the hook for keeping images patched that we're not distroless and it was quite a task to keep up with. Unfortunately I just don't think I'd have enough time to keep up with that on this project.
Going to close this out since I just haven't had much time to spend on this project. Thanks for the idea though!
This PR adds a dockerfile which builds kube-capacity to make it more portable. It would be great to add an automated build step and push it to a docker registry.