It is necessary to know either Container Name or Container ID before we attach Docker container. So, use docker container ls -a command to get the data.
In this article, we cover how to execute a command inside Docker container. It is different from the article we have already covered - Connect to a Shell inside Docker container.
We have seen how to list a docker container in previous article. But, what if we want detailed information about a container?
Before we could stop and start a Docker container, we need to have either NAME of the container or its CONTAINER ID.
The output from the command is divided in seven fields - CONTAINER ID, IMAGE, COMMAND, CREATED, STATUS, PORTS and NAMES.
Docker image contains everything that is required to run our code. In this article, we cover how to run docker container in Ubuntu.