In the past week, I was busy working on a Docker image for Fedora and for Ubuntu, to create a prepared development environment. I thought it was a good idea to create an image based on Fedora (for the RPM world) and another image based on Ubuntu (for the DEB world).
Here is the code so far: https://github.com/SolidCharity/OpenPetraScripts/tree/master/docker
I wanted to have systemd running inside the container, to be able to restart the OpenPetra service during development. I mount the source code working tree so that it can be edited outside. I want an SSH access to work directly on the machine for working with nant etc.
I followed this blog post for having systemd on Fedora: https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container/
That seems to work fine.
I will publish the image soon on Dockerhub.
For Ubuntu, I got stuck with systemd inside the container, and running sshd.
I followed this abandoned project: https://github.com/solita/docker-systemd and https://github.com/solita/docker-systemd-ssh
But it does not work. I guess I will postpone this, until someone really wants or needs to develop OpenPetra on Ubuntu.
Alternatives to docker are: the OpenPetraScripts for CentOS, that will configure your local machine with the development environment: https://github.com/SolidCharity/OpenPetraScripts#setup-a-development-environment.
I personally prefer LXC over Docker, because LXC provides a full machine experience out of the box, and still is just another group of processes on the host. So I create my LXC container, and then run inside the container the OpenPetraScripts for reinstall.sh and setupDevEnv.sh.