当前位置:网站首页>Container common commands
Container common commands
2022-06-30 15:39:00 【Brother's dream】
newly build + Start the container
docker run [OPTIONS] IMAGE [COMMAND] [ARG…]
options Description of common options :
–name=‘ New container name ’ Specify a name for the container
-d Run the container in the background and return it ID, Also start the daemon container ( Background operation )
-i Run the container in interactive mode , Usually with -t Use at the same time
-t Reassign a pseudo input terminal to the container , Usually with -i Use at the same time , That is, start the interactive container ( There is a fake terminal at the front desk , Waiting for interaction )
-P Random port mapping
-p Specify port mapping
docker ps [OPTIONS]
options Common options
-a Lists all currently running containers + Historically run
-l Displays the most recently created container
-n According to recent n Containers created
-q silent mode , Only the container number is displayed
Exit container command
1.exit run go in ,exit sign out , Container stop
2.Ctrl+p+q run go in , Exit the container without stopping
Start the stopped container
docker start Containers ID Or the container name
Restart container
docker restart Containers ID Or the container name
Stop container
docker stop Containers ID Or the container name
Forced stop container
docker kill Containers ID Or the container name
Delete the stopped container
docker rm Containers ID Or the container name
View container log
docker logs Containers ID
View the processes running in the container
docker top Containers ID
see docker Inside details of the container
docker inspect Containers ID
Command to re-enter the container
1.docker exec -it Containers ID bashshell This exit method is recommended
docker attach Containers ID
Copy files from the container to the host
docker cp Containers ID: Container path Destination host path
Import and export containers
docker export Containers ID > file .tar
cat file name .tar | docker import - Mirror user / Mirror name : Image version number
边栏推荐
- Flask-SQLAlchemy----sqlalchemy. exc.InvalidRequestError: SQL expression, column, or mapped e---ORM(9)
- Three types of technical debt that programmers often encounter: code, data, and architecture
- Sword finger offer II 080 Combinatorial backtracking with k elements
- Policy Center > Misrepresentation
- Guada digital analog
- 1062 talent and virtue (25 points)
- 《你的灯亮着吗》开始解决问题前,得先知道“真问题”是什么
- 4.6 floating point number
- Tetris source code (color version)
- 1150 traveling salesman problem (25 points)
猜你喜欢

Single cycle CPU of the design group of West University of Technology

Matlab judge palindrome number (only numbers)
![Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.](/img/c1/99ad29789a669c4498fb93ce1fb009.png)
Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.

Policy Center-Permissions and APIs that Access Sensitive Information

Compare whether the two arrays are the same

At the beginning of the 2022 new year, I will send you hundreds of dry articles

linux下新建Mysql数据库并导入sql文件

Advanced C language - pointer 3 - knowledge points sorting

How to do a good job in high concurrency system design? I have summarized three points

Message queue ten questions
随机推荐
Management joint examination - mathematical formula
1105 spiral matrix (25 points)
1066 root of AVL tree (25 points)
The sound network has fully opened the real-time transmission network sd-rtn, which has been free of network wide accidents for seven years - this is FPA!
Matlab finds a prime number that is greater than a given integer and follows this integer
L - Jungle roads (minimum spanning tree)
001 data type [basic]
Experiment of the planning group of the West University of technology -- pipeline CPU and data processing Adventure
1027 colors in Mars (20 points)
001 basic knowledge (unfinished)
4.7 type() function query data type
Guada digital analog
Message queue ten questions
linux下新建Mysql数据库并导入sql文件
阿里云oss对象存储跨域设置
Noj1042 - electronic mouse running through maze
[ten thousand words long article] thoroughly understand load balancing
Technology sharing | anyrtc service single port design
Fundamentals of C language -- similarities and differences between arrays and pointers
Bye civil engineering, hello CS, can you change the certificate to the Blue Bridge Cup