Docker Nginx Commands Quiz
5 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which command will correctly run a container from the nginx image with the name my-nginx?

  • docker run --name my-nginx nginx (correct)
  • docker start my-nginx nginx
  • docker create --name nginx my-nginx
  • docker launch my-nginx from nginx
  • What is the purpose of the '--name' option in the command to run a container?

  • It sets the specified image to use.
  • It specifies the memory limit for the container.
  • It allows the user to assign a custom name to the container. (correct)
  • It automatically runs the container in detached mode.
  • Which command should you avoid if you want to run a new nginx container named my-nginx?

  • docker exec -it my-nginx bash
  • docker run nginx --name my-nginx (correct)
  • docker create --name my-nginx nginx
  • docker run --name my-nginx nginx
  • What is the expected result of running 'docker run --name my-nginx nginx'?

    <p>It will pull the nginx image if not already available.</p> Signup and view all the answers

    Which of the following commands correctly references the nginx image to run a container?

    <p>docker run --name my-nginx nginx:latest</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser