Useful docker commands

What is docker?

Docker is a service that provides the platform as a service (PaaS) to deliver software in packages called containers.

Useful docker command

It is good to know some of the basic docker commands. Following are some of the docker commands those are useful to remember:

Build and run using single command

$ docker run --rm -it -p 8080:80 $(docker build -q .)

List running docker containers

$ docker container ls

This command stops a running container

$ docker stop <container-id>