How to run docker with current host user, when users are managed with Linux NIS (Network Information Service)
问题 I want to run the docker with my host account, Normally I would do it with: #!/bin/bash user_home="${HOME:-"$(eval echo "~$(whoami)")"}" docker run -it --rm \ --env "USER=$(whoami)" \ -u $(id -u ${USER}):$(id -g ${USER}) \ --volume "${user_home}:${user_home}":ro \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ "ubuntu" /bin/bash But now I need to do it on a PC that manages users with NIS (network information services) My user is not present in the /etc/passwd What