Recall & Review
beginner
What is the Official Nginx Docker image?
It is a pre-built Docker image provided by the Nginx team that contains the Nginx web server ready to run inside a container.
Click to reveal answer
beginner
How do you start an Nginx container using the official image?
Use the command:
docker run --name mynginx -p 8080:80 nginx. This runs Nginx and maps port 80 inside the container to port 8080 on your computer.Click to reveal answer
beginner
Where can you find the Official Nginx Docker image?
On Docker Hub at https://hub.docker.com/_/nginx.
Click to reveal answer
intermediate
How can you customize the Nginx configuration in the official Docker image?
You can mount your own configuration file into the container using a volume, for example:
docker run -v /my/nginx.conf:/etc/nginx/nginx.conf:ro nginx.Click to reveal answer
beginner
What is the default port exposed by the Official Nginx Docker image?
Port 80 is the default port where Nginx listens inside the container.
Click to reveal answer
Which command starts an Nginx container exposing port 80 inside the container to port 8080 on your host?
✗ Incorrect
The syntax is
-p hostPort:containerPort. So -p 8080:80 maps container port 80 to host port 8080.Where is the Official Nginx Docker image hosted?
✗ Incorrect
Official Docker images are hosted on Docker Hub, including the Nginx image.
How can you provide a custom Nginx configuration file to the container?
✗ Incorrect
Mounting a volume with your config file is the easiest way to customize Nginx without rebuilding the image.
What is the default command run by the Official Nginx Docker image?
✗ Incorrect
The image runs Nginx in the foreground with
nginx -g 'daemon off;' to keep the container running.Which port does Nginx listen to inside the container by default?
✗ Incorrect
Nginx listens on port 80 by default inside the container.
Explain how to run the Official Nginx Docker image and access it from your browser.
Think about how ports inside and outside the container connect.
You got /3 concepts.
Describe how to customize the Nginx configuration when using the Official Docker image.
Consider how files from your computer can be shared with the container.
You got /3 concepts.