background The popularity of Docker is closely related to its easy sharing and portability of containers. Users can not only submit containers to public servers, but also export containers to local file systems. Similarly, we can also import the exported container back into the Docker runtime environment. Method 1: Import and export of containers (export and import) 1. View the container that needs to be exported docker ps -a 2. Export The exported tar file is transferred to the machine to be imported docker export container name or container ID > exported path and tarball name docker export centos> centos.tar 3. Import docker import tarball path custom image name: TAG (default is latest) docker import centos.tar test/centos Now there is a new image on the new machine, and you can use this image to directly generate a container. Method 2: Export and import of images (save and load) 1. Save the image docker save > Customize tarball image name: TAG (default is latest) docker save > mysql.tar pinpointdocker/pinpoint-mysql:1.8.3 2. Load import docker load < mysql.tar The difference between docker export and docker save 1. Docker save saves the image, and Docker export saves the container. 2. Docker load is used to load image packages, and Docker import is used to load container packages, but both will be restored to images; Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue2 implements provide inject to deliver responsiveness
Today we will look at why master-slave delay occu...
This article describes the import and export oper...
background Use idea with docker to realize the wh...
This article example shares the specific code of ...
1. Install MySQL database ① Download and unzip an...
Here is a single-line layout using ul>li for l...
1. Demand The local test domain name is the same ...
Here is the mysql driver mysql.data.dll Notice: T...
Official documentation: https://dev.mysql.com/doc...
Table of contents 1. One-way value transfer betwe...
This article shares with you how to use canvas an...
introduce A chart is a graphical representation o...
To draw a table in HTML, use the table tag tr me...
closure service nginx stop systemctl stop nginx s...
1. Query speed of two query engines (myIsam engin...