Top 10 Most Useful Docker Commands

Developing apps today requires so much more than writing code. Multiple languages, frameworks, architectures, and discontinuous interfaces between tools for each lifecycle stage creates enormous complexity. Docker simplifies and accelerates your workflow, while giving developers the freedom to innovate with their choice of tools, application stacks, and deployment environments for each project.

Here are top 10 most useful docker commands that every developer should know.

Container

Create a container from image

docker container create <repo>/<image>:<tag>

Start a container

docker container start <container>

Stop a container

docker container stop <container>

List running containers

docker container ls

Image

Create (or build) an image

docker image build -t <repo>/<image>:<tag> .

Push an image to repository

docker image push <repo>/<image>:<tag>

List images

docker image ls

Delete an image

docker rmi <image>

HouseKeeping

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

docker system prune

Log in to a Docker registry

docker login

Learn How To Install Docker

How to Install Docker On Ubuntu 18.04

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *