In order to connect to a container, you have to find out the PID of the first process in the container.
docker inspect --format "{{ .State.Pid }}" <container-id>
With that PID you can connect to the container:
nsenter --target $PID --mount --uts --ipc --net --pid