Can Discourse ship frequent Docker images that do not need to be bootstrapped?

I know it’s not an easy thing to do. But the purpose of containers is to have a consistent and portable state. So if containers are used as they should be, and it works for you, then there is a fairly high chance it will work for everyone that uses that container.

If the bootstrap alone would be moved inside the container, rather on the host, you would already come quite far in making it portable. I can have a look after I’ve finished other projects. I’m no container expert either, but I’ve build a few. The downside however, is that there is no installation documentation available, right? It’s just; here you go, just run this script. I can try to replicate what the script does. But that doesn’t leave much room for improvement suggestions.

So if the community, especially the people closely involved and have inside information how the installation should work are willing to advice/help out, then I’m willing to start this initiative. Otherwise the quality won’t be what you want to see.

The goals would more or less be:

  • A Dockerfile which has an atomic build of the setup (no local bootstrap outside the container)
  • No need to run the container as root, best is to use fakeroot and add capabilities (these are command line arguments, people can still chose to start a container as root…)
  • Create an entrypoint script that can be influenced by environment variables, which have to be clearly documented
  • podman-generate-systemd or something similar can be used to create a systemd unit to (re)start a container, or start a container at boot (Podman feature, maybe docker has something similar, but is more about making this integrated)

That would be for the basic install. For the scalable solution a docker-compose and Kubernetes solution is needed. Which I frankly don’t find the responsibility of the Discourse community to find a one size fits all solution. Because these things can be very fine tailored, especially on Kubernetes. So I guess a basic compose solution would be sufficient to get people up to speed.

This will provide a portable and more secure solution. Increasing the adoption and quality overall. In the meantime I’ll see if Discourse is really something I need for my community. If I do, then I’ll use an Ubuntu LTS system for now. Once I have more time, I’ll invest time in such a setup.