In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Docker main commands:
Download docker image:
Docker pull xxxx
View the image list:
Docker images
View all containers:
Docker ps-a
Start/stop docker container:
Docker start/stop 92959a6799c3 (92959a6799c3 is container ID)
Batch stop containers:
Docker stop $(docker ps-a-Q)
Delete the container:
Docker rm 92959a6799c3
Bulk delete containers:
Docker rm $(docker ps-a-Q)
Delete the local image:
Docker rmi 10.0.0.2:500/ming:1.0
Enter the existing container:
Docker attach 92959a6799c3
Upload docker image:
Docker tag image:ubuntu1604_v2 10.0.0.2:5000/ubuntu1604_v2docker push 10.0.0.2:5000/ubuntu1604_v2
Give ordinary accounts the permission to start docker containers:
Gpasswd-an aa docker
Start and enter the container:
$docker run-it ubuntu1604_v1 / bin/bash
Or
$docker run-it 10.0.0.2:5000/ubuntu1604_v1 / bin/bash
Mount the host directory to the container (the former host directory, followed by the container directory, which will be automatically generated if the container directory does not exist):
$docker run-it-v / home/super:/home/super 10.0.0.2:5000/ubuntu1604_v1 / bin/bash
Copy data from the host to the docker container:
Docker cp / home/aa 92959a6799c3:/home/
Copy data from the docker container to the host:
Docker cp 92959a6799c3:/home/aa / home/
Save the container as a mirror:
Docker commit 52f44bc1b909 image:ubuntu1604_v2
Export the docker container:
Docker export 52f44bc1b909 > aa.tar
Import the docker container as image:
Cat aa.tar | docker import-ubuntu16:1.0
Export image (0cdfc5c78542 is image ID):
Docker save 0cdfc5c78542 > aa.tar
Import image:
Docker load < aa.tar
Convert iso to image for docker:
Mkdir isomount-o loop ubuntu-14.04.3-server-amd64.iso iso/tar czfv ubuntu14043iso.tar.gz isocat ubuntu14043iso.tar.gz | docker import-ubuntu:server_14.04.3 (import image)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.