Misc

— List info about your Docker Client and Server versions.

— Log in to a Docker registry. Enter your username and password when prompted.

makes an appearance in the next article. Readers on Twitter and Reddit suggested that it would be good to add to this list. I agree, so I’m adding it.

—Delete all unused containers, unused networks, and dangling images.

is short for . Delete unused images, not just dangling ones.

Remove unused volumes. We’ll talk more about volumes in the next article.

UPDATE Feb. 7, 2019: Management Commands

In CLI 1.13 Docker introduced management command names that are logically grouped and consistently named. The old commands still work, but the new ones make it easier to get started with Docker. The original version of this article listed the old names. I’ve updated the article to use the management command names based on reader suggestions. Note that this change only introduces two command name changes — in most cases it just means adding or to the command. A mapping of the commands is here.

Wrap

If you are just getting started with Docker, these are the three most important commands:

— Create a new container and start it. You’ll probably want some flags here.

— Build an image.

— Push an image to a remote registry.

Here’s the larger list of essential Docker commands:

Containers

Use

— Create a container from an image.
— Start an existing container.
— Create a new container and start it.
— List running containers.
— See lots of info about a container.
— Print logs.
— Gracefully stop running container.
—Stop main process in container abruptly.
— Delete a stopped container.

Images

Use

— Build an image.
— Push an image to a remote registry.
— List images.
— See intermediate image info.
— See lots of info about an image, including the layers.
— Delete an image.

Misc

— List info about your Docker Client and Server versions.
— Log in to a Docker registry.
— Delete all unused containers, unused networks, and dangling images.

To view the CLI reference when using Docker just enter the command in the command line. You can see the Docker docs here.

Now you can really build things with Docker! As my daughter might say in emoji: 🍒 🥝 🍊 🍋 🍉 🍏 🍎 🍇. Which I think translates to “Cool!” So go forth and play with Docker!

If you missed the earlier articles in this series, check them out. Here’s the first one:

Learn Enough Docker to be Useful

Part 1: The Conceptual Landscape

towardsdatascience.com

In the final article in this series we’ll spice things up with a discussion of data in Docker. Follow me to make sure you don’t miss it!

I hope you found this article helpful. If you did, please give it some love on your favorite social media channels. Docker on! 👏