30 Docker Commands you Must Know

30 Docker Commands you Must Know

Below are the most useful docker commands that you must know if you are an software engineer. These are the essential cli commands which you should know if your are using or learning Docker.

List of cli commands for docker

Docker Version

docker version : displays the version information of the docker installed on the system

Docker Search

docker search : Searches for images on Docker Hub.

Docker Pull

docker pull : Pulls an image from Docker Hub.

Docker Run

docker run : Creates a container from an image and starts it.

Docker PS

docker ps : Lists all running containers.

Docker PS -A

docker ps -a : Lists all containers, including stopped containers.

Docker Exec

docker exec : Executes a command in a running container.

Docker Stop

docker stop : Stops a running container.

Docker Restart

docker restart : Restarts a stopped container.

Docker Kill

docker kill : Forces a container to stop.

Docker Commit

docker commit : Creates a new image from a container's changes.

Docker Push

docker push : Pushes an image to Docker Hub.

Docker Images

docker images : Lists all images.

Docker RMI

docker rmi : Removes an image.

Docker Build

docker build : Builds an image from a Dockerfile.

Docker Network

docker network : Creates, manages, and connects Docker networks.

Docker Volume

docker volume : Creates, manages, and attaches Docker volumes.

Docker Login

docker login : Logs in to Docker Hub.

Docker Tag

docker tag : Tags an image with a new name or alias.

Docker Inspect

docker inspect : Displays detailed information about a container or image.

Docker Logs

docker logs : Displays the logs for a container.

Docker Port

docker port : Displays the exposed ports for a container.

Docker Swarm

docker swarm : Manages Docker Swarm clusters.

Docker Compose

docker compose : Creates and manages Docker applications.

Docker Trust

docker trust : Verifies the authenticity of Docker images.

Docker Scan

docker scan : Scans an image for vulnerabilities.

Docker Healthcheck

docker healthcheck : Configures a healthcheck for a container.

Docker Config

docker config : Manage Docker configuration files.

Docker Secret

docker secret : Manage Docker secrets.

Docker Plugin

docker plugin : Manage Docker plugins.

For more info you can checkout the official Documentation for Docker

Happy Coding!


🔥 15 Views
Jul 2, 2023

Create Directory if not Exists in DockerFile

To create a Directory that does not exist you have to use the --p command along with the mkdir command. Becausemkdir isn't recursive by default -- it expects the immediate parent directory to exist.

🔥 6.2K Views
Apr 6, 2022

How to create a folder in Docker

To create a folder in docker or a file create a directory for the build context and cd into it. You can use the classic mkdir command to create a folder in Docker.

🔥 5.3K Views
Apr 6, 2022

Dockerfile mkdir permission denied

Docker Filesystems and Docker containers work in a similar manner to filesystems outside a Docker container. To provide users read/write/execute permissions use this command chmod 0777 /usr/local/docker/foo

🔥 5.3K Views
Apr 6, 2022

Async Await in Do While Loop

In this post, we are going to checkout Async Await in Do while loop with examples. Do while Loop in Typescript is same as the Do While Loop in Javascript.

🔥 1.4K Views
Sep 2, 2022

Create Canvas Dynamically in Angular

We can use Renderer API to create canvas dynamically in Angular which can be imported from angular/core package. Renderer API allows DOM maniplulation.

🔥 1.1K Views
Dec 10, 2022

Adding a script to an Angular Library

Adding External Scripts in Angular Library or application. You can add external scripts in angular application on runtime using javascript with few lines of code.

🔥 518 Views
Mar 18, 2022

Docker mkdir permission denied Mac

Docker mkdir permission Failed ? For using data volumes in Docker by command-line and If your Docker host is on the Linux platform, you can find Docker volumes by /var/lib/docker/volumes path.

🔥 430 Views
Apr 7, 2022

Indian Currency Pipe in Angular

Indian currency pipe in Angular, Currency pipe angular without symbol, Angular Currency Pipe is one of the built in pipe in Angular used to format currency value according to given country code,currency,decimal,locale information.

🔥 366 Views
Aug 29, 2022

Repository is not clean. Please commit or stash any changes before updating

Repository is not clean. Please commit or stash any changes before updating. If you are getting such kind of Error use the --force flag along with the ng update command

🔥 282 Views
Apr 15, 2022

Can't bind to 'formgroup' since it isn't a known property of 'form'

Can't bind to 'formgroup' since it isn't a known property of 'form'

🔥 255 Views
Mar 18, 2022