My Name
My Name

Reputation: 57

Export of locally available Docker image to local file system

Is it possible:

Upvotes: 2

Views: 1883

Answers (1)

Henrik Sachse
Henrik Sachse

Reputation: 54212

You can use docker save yournamespace/yourimage:label > image.tar.gz to save your image to a local tar.gz file.

You can then re-import it and set a new tag pointing to your repository with cat yourimage.tar.gz | docker import - yourrepository:5000/yournamespace/yourimage:label.

Then you can push it to your local docker repository called repository with a simple docker push yourrepository:5000/yournamespace/yourimage:label.

EDIT: Keep in mind that volumes are not included in the tar.gz file!

Upvotes: 4

Related Questions