Add experimental "rootless" dind variant by tianon · Pull Request #174 · docker-library/docker

@tmaczukin

docker-library#174 added an experimental
"rootless" variant of the DinD service.

While the change itself is simple and should not affect current usages,
a `DOCKER_HOST` variable was used to define which docker.sock path
should be used depending on the process owner's ID.

Chosing DOCKER_HOST variable for this is unfortunately not the best
option:

1. It's not the best semantic choice - the code that uses it defines a
socket file, not the host. DOCKER_SOCKET just seems to fit better the
purpose.

1. DOCKER_HOST is already a variable, that is used by users to define
where the Docker daemon is listening. In case when it's added to the
DinD container (which is a common situation for example for GitLab CI
jobs that are using DinD as a service), it finally ends with assigning
two times the same port, while once it uses 0.0.0.0 address, and once
some unresolvable domain name (depending on what user defined; most
probably `docker`).

This commit proposes a change of the variable name to DOCKER_SOCKET,
which will better match it purpose and additionally it will stop
breaking configurations of many of docker:dind image users.

Signed-off-by: Tomasz Maczukin <tomasz@maczukin.pl>