Logs and getting terminal of container

docker logs elastic_babbage

Where elastic_babbage is the container name.

You can also use the docker attach command, which connects your terminal to the input, output, and error streams of the container:

docker attach elastic_babbage

Sometimes we will also need to execute commands inside a container. This is possible using the docker exec command. Let's check if we copied all the files:

docker exec elastic_babbage ls -la

If we need something more interactive and don't want to type such a long command every time, we can launch a shell directly inside the container:

docker exec -it elastic_babbage /bin/bash

Starting a stopped container in interactive mode is slightly different:

docker start -i elastic_babbage