#HOW TO CLOSE DOCKER ON MAC FULL#
A flag with one dash is a shortcut for the full flag name. A flag with two dashes in front is the full name of the flag. I’ll provide the command alone and then with common flags, if applicable. I’ll use the name my_container to refer to a generic container throughout the examples. A command referring to a specific container or image requires the name or id of that container or image.įor example, docker container run my_app is the command to build and run the container named my_app.For example, docker container stop stops a container. Docker CLI management commands start with docker, then a space, then the management category, then a space, and then the command.Here are a few things to know about Docker commands: Once you know what you’re working with you can find the right command for the job.
A Docker container that exists is either running or it isn’t.A Docker container either exists or it doesn’t.A Docker image either exists or it doesn’t.To work with Docker commands, you first need to know whether you’re dealing with an image or a container. Also recall that a Docker container is a Docker image brought to life.
Recall that a Docker image is made of a Dockerfile + any necessary dependencies. Now tasty fruits will give us nutrients as we learn our key Docker commands. Veggies provided sustenance in the article on slimming down our images. At risk of taking the food metaphor thread running through these articles too far, let’s use a fruit theme.