0
0
Nginxdevops~5 mins

Official Nginx Docker image - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
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?
Adocker run -p 8080:8080 nginx
Bdocker run -p 8080:80 nginx
Cdocker run -p 80:80 nginx
Ddocker run -p 80:8080 nginx
Where is the Official Nginx Docker image hosted?
ANginx official website
BGitHub
CDocker Hub
DAWS Marketplace
How can you provide a custom Nginx configuration file to the container?
ABy mounting a volume with the config file
BBy editing the container's internal files directly
CBy passing config as a command line argument
DBy rebuilding the Docker image only
What is the default command run by the Official Nginx Docker image?
Anginx -g 'daemon off;'
Bnginx -s reload
Cbash
Dservice nginx start
Which port does Nginx listen to inside the container by default?
A443
B22
C8080
D80
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.