dockviz
dockviz copied to clipboard
Create a more generic docker image
From @gesellix:
Hey, I made a combined image for personal use, but it might help you to build a more generic variant. I also stumbled over some dynamic library issues when running a dockviz release in an Alpine image (using musl libc instead of glibc), which is why I build the binary during the Docker build.
See https://github.com/gesellix/docker-tree-viz for the source.
What would be needed in a more generic image?
As you can see in https://github.com/gesellix/docker-tree-viz/blob/master/viz.sh I use some dirty script hacking to handle the different options dockviz supports. Apart from the knowledge the shell script needs about dockviz, the main issue from my perspective is that you cannot easily provide images via stdin anymore. Maybe it would be nice to add an option to dockviz which allowed to "post process" its result by calling another executable. That would minimize the need to wrap dockviz in a shell script. Such a feature should obviously be optional. Then, without the wrapper script, passing input via stdin would become easier again.
I guess a first step to a more generic dockviz image would be to change the base image from scratch to something like alpine or similar. Alpine would be nice, because their package manager/repository already provides most utilities you and others might need, which consequently makes a dockviz image suitable as base image for more specific use cases.
Makes sense. Thanks for explaining your use case.
I'll see what I can do.
Though I'm no Golang expert, I'd be happy to help by providing PRs if you like :-)