0% found this document useful (0 votes)
65 views1 page

Nginx-Test 8080 80: Docker Image Pull Nginx Docker Container Run - D - Name Nginx-Test - P 8080:80 Nginx

The document provides instructions for downloading an NGINX container image from Docker Hub, running the container with the name "nginx-test" and port mapping, checking that the container is running, accessing the default NGINX page, and stopping and removing the container and deleting the image. It also mentions that Docker images can be hosted on public or private registries like Docker Hub, Quay, Google Container Registry, and AWS Container Registry.

Uploaded by

ksrinivas9999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

Nginx-Test 8080 80: Docker Image Pull Nginx Docker Container Run - D - Name Nginx-Test - P 8080:80 Nginx

The document provides instructions for downloading an NGINX container image from Docker Hub, running the container with the name "nginx-test" and port mapping, checking that the container is running, accessing the default NGINX page, and stopping and removing the container and deleting the image. It also mentions that Docker images can be hosted on public or private registries like Docker Hub, Quay, Google Container Registry, and AWS Container Registry.

Uploaded by

ksrinivas9999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

To download and launch the container all you need to do run the following commands

from your terminal prompt;

docker image pull nginx

docker container run -d --name nginx-test -p 8080:80 nginx

The first command pulls the NGINX container image from the Docker Hub, and the second
command launches our NGINX container, naming it nginx-test mapping port 8080 on
your machine to port 80 on the container.

You can check that the container is running using the following command:

docker container ps

Opening your browser and going to http://localhost:80/ should show you the default
Welcome to NGINX page.

Once you have tested launching a container you can tidy up afterwards by running the
following commands to stop and remove the container and then delete the image:

docker container stop nginx-test

docker container rm nginx-test

docker image rm nginx

A Docker Registry could be hosted by a third party as a public or private registry, such as
one of the following registries:

Docker Hub (https://hub.docker.com/)


Quay (https://quay.io/)
Google Container Registry (https://cloud.google.com/container-registry/)
AWS Container Registry (https://aws.amazon.com/ecr/)

Docker container run -i -t ubuntu:16.04 /bin/bash

You might also like