user7693832
user7693832

Reputation: 6849

Is there a way of copy docker image into host docker images location rather than create a repository?

I use Dockerfile created a docker image named alphine-test:

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
alphine-test        v1.0                6837c85a8b1b        5 days ago          4.15MB

now I have some questions about it:

docker image seems store use levels. there is not a constant location to store an image like a file. so there is a way for providing source by build own docker repository. then pull the repo from it.

but whether there is other way to provide images like copy a vm's image, such as centos8.2's OS image(this is a vm OS file, not docker image).

because use this way is convenient and do not need to create a repository and push/pull images.

Upvotes: 0

Views: 38

Answers (1)

matheuslao
matheuslao

Reputation: 16

docker image save -o foo.tar alphine-test:v1.0

And

docker image load -i foo.tar

Upvotes: 0

Related Questions