I am trying to get nomad 12.8 to install a Traefik 2.3 instance. Traefik requires access to the Docker socket. Despite my best efforts I simply can’t get it mounted in the container as indicated by the container logs:
Provider connection error Cannot connect to the Docker daemon at unix:///var/run/docker.sock
Does anyone have an example nomad job which shows how to make the docker.sock available in the container?
Accessing http://localhost/demo will reach the different instances of the app:
$ curl http://10.0.2.15/demo
Welcome! You are on node 10.0.2.15:29672
$ curl http://10.0.2.15/demo
Welcome! You are on node 10.0.2.15:30195
$ curl http://10.0.2.15/demo
Welcome! You are on node 10.0.2.15:23164
One important piece is to enable mounting host paths in the Docker plugin configuration for your Nomad clients: