We seperate the number of Docker daemons in the machine docker : the default installation docker-apps : the isolated docker installation for applications
The main goal is to have separate docker daemons running on the same machine isolated. Our use case was the jenkins server. I used to run my jenkins server in a docker container and I wanted to isolate the docker that uses jenkins to launch containers.
- Create the service file for the daemon
Edit appropriately docker-apps.service file and place it in
/etc/systemd/system/
directory
sudo cp ./docker-apps.service /etc/systemd/system/docker-apps.service
- Create the socket file
sudo cp ./docker-apps.socket /etc/systemd/system/docker-apps.socket
- Create the new daemons data-root directory
sudo mkdir /var/lib/docker-apps
- Place the configuration file in
/etc/docker/
sudo cp ./docker-daemon-apps.json /etc/docker/docker-apps.json
- Enable new service
sudo systemctl enable docker-apps.service
sudo systemctl enable docker-apps.socket
- Run new service
sudo systemctl start docker-apps.socket
sudo systemctl start docker-apps.service
- Antonios Inglezakis (@antIggl)