Ubuntu with GPU Docker: "no matching entries in passwd file"

I am running docker in ubuntu 18.04, with a GPU Nvidia. nvidia-. The docker image was built with no errors. When I run

GPU=0 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker

I get no error message. But when I run:

docker exec --user $USER -it containername /bin/bash

I get:

Error response from daemon: Container b6761d046e4e4e104c2d4bdbaf52528a59bcd171e4f5ca9a652248be05a4248c is not running

I think the docker exits automatically when I run it. Because when I run the two commands in chain (I have to first remove the container for this), I get an error message:

unable to find user alvaro: no matching entries in passwd file

I would appreciate a lot some advice on this.

This is not really a bioimage informatics question so you may have better luck on Server Fault or StackOverflow. This being said, it could be related to this bug. As written there, the current solution is to restart the Docker engine.

responded on Github: https://github.com/MMathisLab/Docker4DeepLabCut2.0/issues/16