docker run --name nginx -p 80:80 -d nginx
时间: 2023-11-13 07:35:16 浏览: 138
Docker 搭建tomcat挂载本地、搭建nginx 挂载本地、实现nginx反向代理tomcat三篇文章是连载的,不懂的可以
This command creates and runs a Docker container named "nginx" with the official Nginx image. It also maps the host machine's port 80 to the container's port 80 using the "-p 80:80" option, allowing access to the Nginx web server from the host machine's web browser. Finally, the "-d" option runs the container in detached mode, meaning it runs in the background, allowing the user to continue using the terminal.
阅读全文