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
Quick Start 1. Find the nginx image on Docker Hub...
The JD carousel was implemented using pure HTML a...
Preface In the application of database, programme...
1. Background Sysbench is a stress testing tool t...
1. Overview Zabbix is a very powerful and most ...
1. Add in package.json "main": "el...
Table of contents 1. Browser support 2. export ex...
Table of contents Preface 1. What is scalability?...
Table of contents 1. Handwritten instanceof 2. Im...
Preface I feel like my mind is empty lately, as I...
This article mainly introduces the sample code of...
<br />Table is an awkward tag in XHTML, so y...
Table of contents 1. Preface 2. Find two pop-up c...
There are many loopholes in the simple seamless s...
Another important aspect of separating structure ...