Fix race condition and enable socket

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <docker@nfnty.se> (github: nfnty)