Docker Commands

List of Docker Commands

1) docker –version 
 To get the currently installed version of docker.

2) docker pull
Exp:docker pull
This command is used to pull images from the docker repository.

3)docker run
Exp:docker run -it -d
This command is used to create a container from an image.

4)docker ps
This command is used to list the running containers.

5)docker ps -a
This command is used to show all the running and exited containers in to docker.

6)docker exec
Exp: docker exec -it bash
This command is used to access the running container.

7)docker stop
Exp:docker stop
This command stops a running container with this Id.

8)docker kill
Exp:docker kill
This command kills the container by stop its execution immediately.

9)docker commit
Exp:docker commit
This command creates a new image of an edited container on the local system.

10)docker login
This command is used to login to the docker hub repository.

11)docker push
Exp:docker push
This command is used to push an image to the docker hub repository.

12)docker images
This command lists all the locally stored docker images.

13)docker rm
Exp:docker rm
This command is used to delete a stopped container.

14)docker rmi
Exp:docker rmi
This command is used to delete an image from local storage.

15)docker build
Exp:docker build
This command is used to build an image from a specified docker file.

16)docker help
This command will provide listing all docker command with syntax.

17)docker info
This will show you several pieces of information about the OS.

18)docker search busybox
This command will search the online Docker registry for a Image named busybox.

No comments: