当前位置:网站首页>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
边栏推荐
- Technology sharing | anyrtc service single port design
- Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.
- Is Domain Driven Design (DDD) reliable?
- Complement (Niuke)
- 1058 a+b in Hogwarts (20 points)
- 4.4 string
- How to do a good job in high concurrency system design? I have summarized three points
- Summary of gradient descent optimizer (rmsprop, momentum, Adam)
- BYD is more and more like Huawei?
- Policy Center > Malware > Malware
猜你喜欢

Message queue ten questions

Notes on zero basic C language learning -- first introduction -- 1 notes that mom can understand

C language foundation - pointer array - initialization method & constant pointer array, pointer constant array

Oracle中的With As 子查询

Advanced functions of ES6 operation array map (), filter (), reduce()

Is Domain Driven Design (DDD) reliable?

Database connection to company database denied

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

《你的灯亮着吗》开始解决问题前,得先知道“真问题”是什么

消息队列十连问
随机推荐
Abstract meaning
4.6 floating point number
Mysql database - create user name & modify permission
H - Arctic network (minimum spanning tree)
Curl: (23) failed writing body (1354 i= 1371) problem solving method
How to get palindrome number in MATLAB (using fliplr function)
[matlab] 3D drawing summary
Imitating freecodecamp to build a programming ability test platform
A. Theatre Square(codefore)
RTC monthly tabloid programming challenge ended successfully in June; Review of the first anniversary of sound network's listing
The short video and live broadcast incubation training camp with goods opens nationwide enrollment!
My own opinion on lisp
1035 password (20 points)
4.12 input() input function and comments
Basic literacy - four common software architectures
G - building a space station
Noj1042 - electronic mouse running through maze
At the beginning of the 2022 new year, I will send you hundreds of dry articles
【子矩阵数量统计】CF1181C Flag子矩阵数量统计
1066 root of AVL tree (25 points)