roelj / inklingreader

A GNU/Linux-friendly version of the Wacom Inkling SketchManager.
GNU General Public License v3.0
50 stars 16 forks source link

Running in Docker-Container #49

Open macwinnie opened 5 years ago

macwinnie commented 5 years ago

Hi @roelj,

Thanks for your tool – since the original one by Wacom regularly breaks my Illustrator and even does not work at all, I'm glad to have an alternative to get my Sketches from Inkling to SVGs and further.

I like the idea of how most Mac-Applications work very much: a file / folder and some little config files, so programs are removable very easy – and even installable very fast. On my systems (Linux and MacOS) I regularly try to avoid to mess the system with programs I do not use every day.

Since Docker gives us the ability to containerise apps, I think it is a great way to prevent messing the system up – and built a Docker image which is at least simple: https://hub.docker.com/r/macwinnie/inklingreader/

Probably this could be an easy way to provide the tool to other users. If you would like to link your repository to the Docker image, so it will be rebuilt every time you push a change / improvement, let's get in contact =)

Cheers, Martin

roelj commented 5 years ago

Hello @macwinnie,

First of all, thanks for taking the time to set up a Docker image.

I would like to elaborate a bit on the use of Docker, and how it (does not) fit into the idea of "distributions". I think we should not forget the value of GNU or GNU/Linux distributions in packaging a wide diversity of tools in an efficient way to create a stable software operating system. It's absolutely great to have tools all share the same libssl.so, so that when a security vulnerability is found, it can be fixed in a single place for all programs in the system.

Using containers, or "Dockers" specifically, undermines that feature. I wonder how this will affect a user's freedom in the long run. I honestly don't know how this will work out. That being said, it's a nice addition to the already-available ways of getting GNU Inklingreader to work!

What would be even cooler is if we could use GNU Guix to generate the container. So I went ahead and tried that using this command:

guix pack -f docker -S /bin=bin -S /share=share -S /lib=lib -S /var=var inklingreader

Which produces this tarball (you could try building one yourself too). I then used the following command to load the container:

docker load < inklingreader-docker.tar.gz

And ran inklingreader like so:

docker run -i -t <image-id> /bin/inklingreader

Unfortunately, this failed to use the host's X11 display. How did you get this to work on your container? I might be missing some more dependencies, which we would have to append to the list of packages at the end of the guix pack command.

We could add a target to the Makefile to generate a Docker container from Guix, and add the tarball to the "releases" page. It doesn't need a Docker file, and it doesn't need a "host" distribution inside the container. It simply copies the run-time referenced data into the container image (which should produce a fairly minimal container).

I hope going about containers this way (using a GNU distribution) will raise a little awareness for the importance of software distributions, and does not only favor those non-free OSes that simply don't have a great package management system like the GNU/Linux distros have. ;-)

What do you think?