zabbly / incus

Incus package repository
176 stars 14 forks source link

Any interest in adding Dockerfiles? #41

Closed cmspam closed 2 months ago

cmspam commented 3 months ago

I have been maintaining container images based on your work on this repository here:

https://github.com/cmspam/incus-docker/

I am curious if you are interested in adding a Dockerfile and automated build actions to maintain a docker image from this repository directly, obsoleting my work maintaining the docker image.

Forgive me if it's out of scope of what you want to do, but I think it may be really helpful, since there are still many distributions and setups where incus isn't (and may never be) distributed, and incus performs pretty well even when it is running from a container.

If not, no worries, I can continue working on it.

stgraber commented 3 months ago

Hey there,

So that's a slightly tricky one. It'd obviously be pretty simple and convenient to just include the Dockerfile in there, though the issue is that my company offers commercial support to what's in that repo, so that would then make things a bit confusing for anyone using the Docker images as I'm not really ready to commercially support those :)

I think the separate repo is best but I also think we should be able to do more to keep things integrated so you don't need to manually trigger builds and the like.

We should be able to put a Github workflow in place in this repo (stable branch) to kick a build of yours automatically.

It'd probably also make sense to add Docker as a "distro" to doc/installing.md in the incus repository, feel free to send a PR for that.

How does that sound?

cmspam commented 3 months ago

I'm happy that you'd like to cooperate in this, and can understand about the support.

On that note, if I will be maintaining the Dockerfile, I would like to do some more testing on various distributions, as well as looking into anything I may be doing incorrectly size-wise like including unnecessary packages, and provide better instructions to run the containers with the exact necessary mounts and permissions for all functionality to work properly (there are a lot of different potential options which impact cgroups and the various filesystem functionalities as I'm sure you can imagine) on as many host distributions as possible to ensure compatibility. So, before adding docker as a "distro" in the documentation, I think it may be best for me to take it very seriously for public consumption, as I had mainly just made the Dockerfile for myself up to now and only sharing in case it helps others, building and publishing it to docker hub manually without a proper versioning, and so on.

I think it will be fun to work on, so I will find some time soon for some analysis, testing and optimization of my Dockerfile, then perhaps we can start integrating more?

As a first question, I have been basing it on your bookworm packages, but I know you maintain packages for ubuntu as well. Do you have a suggestion/preference for which of the distributions you build for I should base the Dockerfile on? I would like to follow your advice and preferences as closely as possible if it will be an 'official' enough distribution to be in the docs. Or if you should have any other advice or suggestions regarding how it is best to do, please feel free to tell me, and I will follow it.

cmspam commented 3 months ago

OK, I feel pretty good about things at present. I have implementation a github action to build, and we can work on integration if you like.

I also am submitting a pull request as you had mentioned. https://github.com/lxc/incus/pull/785