Escrever um script de usuário para o recipiente
[root @ linux-node1 ~] # vim docker_in. sh # ! / bin / festa # Use nsenter ao acesso estivador docker_in () { NAME_ID = $ 1 PID = $ (estivador inspecionar --format " {{.State.Pid}} " $ NAME_ID) nsenter --target $ PID - - montar --uts --ipc --Peso líquido - pid } docker_in $ 1 [root @ linux -node1 ~] # chmod + x docker_in. sh [root @ linux -node1 ~] # ./docker_in. sh mydocker [root @ 94bb1c151fbc / ] # exit Sair [root @ linux -node1 ~] #