ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 285 - XK0-005 discussion

Report
Export

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
Answers
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
Answers
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
Answers
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
Answers
D.
docker update comptia/app:2.1.1 comptia/app:2.1.2
Suggested 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.

asked 02/10/2024
Rostyslav Skrypnyk
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first