Most commonly used commands for Docker

docker image

Here is the list of most commonly used docker commands:

docker –version
This is used to check the version of the current installed docker.
docker pull image_name
This is used to pull images from the docket repository - hub.docker.com
docker push image_name
This is used to push an image to the docker repository 
at hub.docker.com
Documentation for creating a repository can be found 
at https://docs.docker.com/docker-hub/repos/
docker commit container_id username/imagename
This creates a new image of an edited container image
on the local system
docker run
This is used to create a container from an image
docker ps
This is used to list the running containers
docker exec -it container_id bash
This is used to access the current running container
docker login
This is used to login to the docker hub repository - hub.docker.com
docker stop container_id
This is used to stop a running container
docker kill container_id
This kills the container by stopping its execution immediately
docker images
This lists all docker images which are stored locally
docker rm
This will delete a stopped container
docker rmi image_id
This deletes an locally stored image
docker build path_to_docker_file
This will build an image from a given docker file