CompTIA Linux+ (XK0-005) — Question 119
A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available?
Answer options
- A. docker image load java:7
- B. docker image pull java:7
- C. docker image import java:7
- D. docker image build java:7
Correct answer: B
Explanation
The correct command is 'docker image pull java:7' because it retrieves the specified image from a repository, making Java 7 available locally. The other options are incorrect as 'load' and 'import' are used for different purposes, and 'build' is meant for creating images from a Dockerfile rather than pulling existing images.