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.
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
Create (or build) an image
docker image build -t <repo>/<image>:<tag> .
Push an image to repository
docker image push <repo>/<image>:<tag>
docker image ls
Delete an image
docker rmi <image>
Delete all unused containers, unused networks, and dangling images.
docker system prune
Log in to a Docker registry