docker related commands and fifth car platform to build rental operations

39. The fifth car platform to build [buns] Source Forum wowotoubbs.com Contact QQ: 2171793408, Tel: 17061863521

38. Mirror Import

docker load -i xx.tar

or

docker load < xx.tar

 

37. Save the image to the specified tar archive

docker save -o xx.tar mirror Name: Label

 

36. Specifies an image to create history

docker history image name

 

35. Remove Local one or more mirrors

docker rmi -f image name

 

34. Logout

docker logout

 

33. Log on to the mirror warehouse

docker login -u user name -p password

 

32. Check the container file structure changes

docker diff container name

 

31. The container of data between the host copy

docker cp host directory data directory container

 

30. The output is exported to the file system as a platform tar archive

docker export -o xx.tar container name

 

29. blocked from running until the container stop

docker wait vessel name

 

28. Get real-time events from the server

docker events parameters

 

27. The connection is working container

docker attach the container name / ID

 

26. Create a new container, does not start

docker create mirror name: Label

 

25. The recovery process container

docker unpause container name

 

24. suspend all processes in the vessel

docker pause container name

 

23. kill the process

docker kill -s KILL container name

 

22. enter the interior of the container

docker exec -it container name / ID / bin / bash

 

Settings tab 21. Mirror

container dokcer tag name / ID mirror Title: tag name

 

20. submit a copy of container

docker -m = "Description" commit -a = "Author" container Name / ID specified image name: name tag

 

19. Find Mirror

docker search image name

E.g:

docker search nginx

 

18. Delete container

docker rm container name / ID

 

17. Restart container

docker restart vessel name / ID

 

16. Start a container

docker start container name / ID

 

15. Review of the container inside running processes

docker top container name / ID

E.g:

docker top mysql

 

See container 14. Port Mapping

docker port container name

E.g:

docker port mysql

 

13. view a usage instructions

docker command name --help

E.g:

docker ps --help

 

12. View container logs

docker logs container name / ID container

E.g:

docker logs mysql

or

docker logs -f mysql

 

11. Mirror Pull

docker pull mirroring Name: Label

E.g:

docker pull nginx

 

10.push to mirror warehouse

docker tag mirror Name: Mirror version Warehouse Address: tag

docker push mirror Warehouse Address: tag

 

9. Check container configuration and status information

docker inspect container name

or

docker inspect containers ID

 

8. Stop the container

docker container stop container name

or

docker container stop 容器ID

or

Container ID docker stop

 

7. Start container

docker run

# Background process

-d

# Specify the port

-p 80:80

# Interactive mode

-i

 

# Container name

--name container name

-v will host the project directory to the directory container mount

--link network will be incorporated into a container of the current container you want to start

Mirroring name

 

6. Construction image based Dockerfile

docker build --tag = mirror name: v0.0.1.

or

docker build -t image name.

The container ID View All

docker container ls -aq

 

4. Check all containers

docker container ls --all

or

docker container ls -a

or

docker container ls

or

docker ps

or

docker ps -a

or

The number of rows displayed docker ps -n

E.g

docker ps -n 3

or

# View last container created

docker ps -l

3. Review the list of mirrors

docker image ls

or

docker images

or

docker images image name

E.g:

docker images nginx

or

docker images | grep nginx

 

2. Review the information docker

docker info

 

1. Check the version docker

docker --version

or

docker version

Guess you like

Origin www.cnblogs.com/quanyanwusheng/p/10937861.html