top of page

Docker Command Line Interface on Windows Server 2016

  • Mohan Sekar
  • Nov 14, 2017
  • 2 min read

List of Docker Commands

1.Display system-wide information

docker info

2.Display docker installed version

docker version

3.List docker all images

docker images

4.List docker all the running container

docker ps

5.Show all the containers

docker ps -a

6.Show recently created container

docker ps -l

7.Display numeric IDs of running container

docker ps -q

8.To show information on space usage

docker system df

9. To Show detailed information on space usage docker system df -v

10.Download the windowsservercore image from docker hub and Run a command in a new container docker container run microsoft/windowsservercore

11. Pull an image or a repository from a registry docker pull microsoft/windowsservercore

12. Rename a container docker rename CONTAINER NEW_NAME

13. Start one or more stopped containers docker start microsoft/windowsservercore

14. Stop one or more running containers docker stop microsoft/windowsservercore

15. Display the running processes of a container docker top CONTAINER

16. Show the history of an image docker history microsoft/windowsservercore

17. Run a command in a running container docker exec -it windowsservercore powershell

18. Close the running powershell container session Ctrl+P+Q

19. Pause all processes within one or more containers docker pause microsoft/windowsservercore

20. Unpause all processes within one or more containers docker unpause microsoft/windowsservercore

21. Remove one or more containers docker rm container_name

22. Remove one or more images docker rmi image_name

23. Copy files/folders between a container and the local file system docker cp foo.txt mycontainer:/foo.txt docker cp mycontainer:/foo.txt foo.txt

24. Display a live stream of container(s) resource usage statistics docker stats

25. Restart one or more containers docker restart my_container

26. To see the top processes within a container. docker top <ContainerID>

27. To attach local standard input, output, and error streams to a running container. docker attach <ContainerID>

28. To tag an image to the relevant repository. docker tag <imageID> <Repositoryname>

29. To push images to the Docker Hub. docker push <RepositoryName >

30. List all the docker volumes on a docker host. docker volume ls

31. To create a new volume docker volume create –-name = demo –opt o = size = 100m

32. List all the networks docker network ls

33. To inspect the network docker network inspect <NetworkName>

34. To see container logs docker log <containerID>

35. Log in to a Docker registry docker login -u <UserName> -p <Password>

Comentários


RECENT POSTS:
SEARCH BY TAGS:

© 2023 by NOMAD ON THE ROAD. Proudly created with Wix.com

  • b-facebook
  • Twitter Round
  • Instagram Black Round
bottom of page