providers/docker: use a mutex for intra-process lock