nerdexam
CompTIA

XK0-006 · Question #27

A Linux administrator needs to create and then connect to the app-01-image container. Which of the following commands accomplishes this task?

The correct answer is A. docker run -it app-01-image. The docker run -it command both creates a new container from the specified image and attaches to it interactively, which is exactly what the administrator needs.

System Configuration and Management

Question

A Linux administrator needs to create and then connect to the app-01-image container. Which of the following commands accomplishes this task?

Options

  • Adocker run -it app-01-image
  • Bdocker start -td app-01-image
  • Cdocker build -ic app-01-image
  • Ddocker exec -dc app-01-image

How the community answered

(39 responses)
  • A
    87% (34)
  • B
    3% (1)
  • C
    3% (1)
  • D
    8% (3)

Explanation

The docker run -it command both creates a new container from the specified image and attaches to it interactively, which is exactly what the administrator needs.

Topics

#Docker#docker run#container management#interactive terminal

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice