I am running Jenkins in a docker container and Jenkins tries to run my maven build. As part of the build, the docker maven plugin instructs it to build a docker image.
This can be resolved by adding DOCKER_HOST environment variable in Jenkins.
DOCKER_HOST
Setup your docker daemon like this:
[/etc/sysconfig/docker] OPTIONS="-H tcp://127.0.0.1:4243"
Jenkins Jobs (Inject environment variables):
DOCKER_HOST=tcp://127.0.0.1:4243