Which of the following commands should be used to rename the image to match the correct version 2.1.2?

A new application container was built with an incorrect version number.

Which of the following commands should be used to rename the image to match the correct version 2.1.2?

A. docker tag comptia/app:2.1.1 comptia/app:2.1.2

B. docker push comptia/app:2.1.1 comptia/app:2.1.2

C. docker rmi comptia/app:2.1.1 comptia/app:2.1.2

D. docker update comptia/app:2.1.1 comptia/app:2.1.2

Answer: A

Explanation:

The best command to use to rename the image to match the correct version 2.1.2 is

A. docker tag comptia/app:2.1.1 comptia/app:2.1.2. This command will create a new tag for the existing image with the new version number, without changing the image content or ID. The other commands are either incorrect or not suitable for this task. For example:

B. docker push comptia/app:2.1.1 comptia/app:2.1.2 will try to push two images to a remote repository, but it does not rename the image locally.

C. docker rmi comptia/app:2.1.1 comptia/app:2.1.2 will try to remove two images from the local system, but it does not rename the image.

D. docker update comptia/app:2.1.1 comptia/app:2.1.2 will try to update the configuration of a running container, but it does not rename the image.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments