DCA · Question #51
What is one way of directly transferring a Docker Image from one Docker host in another?
The correct answer is D. 'docker save' the image to save it as TAR file and copy it over to the target host. Then use 'docker. This question asks for a direct method to transfer a Docker image between two Docker hosts without using a registry.
Question
What is one way of directly transferring a Docker Image from one Docker host in another?
Options
- A'docker push' the image to the IP address of the target host.
- B'docker commit' to save the image outside of the Docker filesystem. Then transfer the file over to
- CThere is no way of directly transferring Docker images between hosts. A Docker Registry must be
- D'docker save' the image to save it as TAR file and copy it over to the target host. Then use 'docker
How the community answered
(37 responses)- A3% (1)
- C3% (1)
- D95% (35)
Why each option
This question asks for a direct method to transfer a Docker image between two Docker hosts without using a registry.
`docker push` is used to send an image to a Docker registry, not directly to the IP address of another Docker host.
`docker commit` creates a new image from a container's changes but does not save the image as a transferable file outside the Docker filesystem.
While a Docker Registry is the standard and recommended method for sharing images, `docker save` and `docker load` provide a direct transfer mechanism between hosts.
The `docker save` command exports a Docker image as a TAR archive, which can then be transferred to another host and subsequently imported using the `docker load` command.
Concept tested: Docker image transfer methods
Source: https://docs.docker.com/engine/reference/commandline/save/
Topics
Community Discussion
No community discussion yet for this question.