Use user specific tmp directory

Expected behavior

With multiple users be able to run a docker server for each user.

Actual behavior

Docker server for second user cannot be created because of permission issues:
: Failed to remove existing socket on /var/tmp/com.docker.osxfs.volume.socket: remove /var/tmp/com.docker.osxfs.volume.socket: permission denied


Docker uses a hardcoded path /var/tmp/ for state and socket files. It would be preferred to use a user specific tmp path like $TMPDIR which results in a unique user specific temporary folder.

Steps to reproduce the behavior

  1. Start docker server for user1
  2. logout user1/switch user2
  3. Try to start docker server for user2

The sockets are being moved, other than the main docker socket, which is expected by the client, we will either change the client behaviour or some other workaround here.