Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:docker_container_betreten

Docker Container betreten

Find out a container’s name or ID with the docker ps command:

$ docker ps
CONTAINER ID  IMAGE    COMMAND  CREATED      STATUS      PORTS  NAMES
72ca2488b353  my_image          X hours ago  Up X hours         my_container

Enter a Docker container by name or ID and start a bash shell:

$ docker exec -it 72ca2488b353 bash

If the bash shell is not found, you will get the message as follows:

oci runtime error: exec failed: container_linux.go:265: starting container process caused “exec: \”bash\”: executable file not found in $PATH”

In this case you can enter a Docker container and start a simple sh shell:

$ docker exec -it 72ca2488b353 sh

Quelle

linux/docker_container_betreten.txt · Zuletzt geändert: 2019/11/11 21:23 von rldml

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki