Managing Docker Containers
Throughout our container journey, we will be pulling, starting, stopping, and removing containers from our local environment quite frequently. Prior to deploying a container in a production environment, it is critical that we first run the container locally to understand how it functions and what normal behavior looks like. This includes starting containers, stopping containers, getting verbose details about how the container is running, and, of course, accessing the container logs to view critical details about the applications running inside the containers. These basic commands are outlined as follows:
docker pull
: This command downloads a container image to the local cachedocker stop
: This command stops a running container instancedocker start
: This command starts a container instance that is no longer in a running statedocker restart
: This command restarts a running containerdocker attach
: This command allows users to gain...