View the available versions of Nginx

docker search nginx
Copy the code

Select latest image from Nginx

docker pull nginx
Copy the code

Three, run the container

docker run --name nginx -p 8080:80 -d nginx
Copy the code

4. Access interface

http:localhost:8080
Copy the code