The documentation describes import as follows:ĭocker import – Import the contents from a tarball to create a filesystem image. To import an exported container as an image, we use the docker import command. import takes this file system and imports it as an image, which can run as-is or serve as a layer for other images. As we saw above, export gives us a file system. There’s no way to “import a container” (which wouldn’t make sense, as it’s a running environment). While save and load are easy to understand, both accepting and resulting in an image, the relationship between import and export is a little harder to grok. If we want to clone or move it, we could rebuild it from scratch from the original image, but it would be much faster to export a current snapshot of it, similar to how you might use a prebuilt binary as opposed to compiling one yourself. Why is this useful? Imagine our app is more complicated and takes a long time to build, or it generates a bunch of compute-intensive build artifacts. As we can see, this is just a regular old Linux file system - the BusyBox file system created when running our image, to be precise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |