The command line interface is where we communicate with the daemon using the Docker command. The Docker daemon is the background process that receives the commands that are typed by us.
In the previous chapter, we ran a few Docker commands to start and stop containers as well as to list containers and images. Now, we are going to learn a few more that will help us when handling containers for our PaaS, as follows:
docker logs <container-ID|name>
: Everything that is written to theSTDOUT
containers will end up in the file that can be accessed via this command. This is a very handy way to output information from within a container, as shown here:docker export <container-ID|name>
: If you have a container that holds data that you want to export, this is the command to be used. This creates a tar archive and sends it toSTDOUT
:docker cp CONTAINER:PATH HOSTPATH
: If you don't want the whole file system from a container but just one directory or a file...