docker run --name nginx -p 80:80 -d nginx
时间: 2023-11-13 14:35:16 浏览: 133
Docker 安装 Nginx
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.
阅读全文