CentOS 7 container with systemd as pid 1
This container runs systemd and does nothing else.
- Start it with
docker run --privileged -d -v /sys/fs/cgroup:/sys/fs/cgroup:ro rasschaert/systemd_centos7
- Create a bash session with nsenter
- install, configure and start another service
- Create a more useful image with docker commit.
All credit for getting this to work goes to Dan Walsh, you can read more about it on his blog.
I prefer my approach, with nsenter, at least until docker implements a similar mechanism.
Docker Pull Command