Podcast
Questions and Answers
Which command will correctly run a container from the nginx image with the name my-nginx?
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?
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?
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'?
What is the expected result of running 'docker run --name my-nginx nginx'?
Which of the following commands correctly references the nginx image to run a container?
Which of the following commands correctly references the nginx image to run a container?