Contents

A Running Docker Container, How to access?

The standard documentation describes installing an SSH daemon and remotely connecting to it, optionally with X over SSH.

A better and possibly more secure way is to access the container's console directly without using a network connection. This is also practical because not all containers set up with a working network interface by default and for those if you don't remember to install required remote access components before exiting the first time, that container may become unusable following official documentation.

Simply Displaying the Container's console

The following command is described in the official documentation, but only displays and is not interactive

The simple instructions, modified which should work on any platform (not just an openSUSE Host)

Download and install the Docker image

The following command is a bit unusual... It downloads the Docker image to the Host but instead of invoking with a Docker command is instead placed in the Host's /usr/local/bin directory so you can run it as a simple binary on its own instead of within Docker

dockerrun-v/usr/local/bin:/targetjpetazzo/nsenter

Opening the Default Console in your Container

This is a 2 step procedure

PID=$(dockerinspect--format{{.State.Pid}}<container_name_or_ID>)

Followed by (note the following diverges from the official instructions)

docker-enter<containeridorcontainername>

When you're done and want to leave the container, as alwasy just type "exit" which should leave the container running until you invoke "docker stop <containername>"

exit

So cool.

And it works in the most simple way with containers which practically eliminates any dependencies.