docker-compose运行nginx

创建的docker-compose.yml文件
version: '3.1' services: nginx: restart: always image: nginx container_name: nginx ports: - 80:80 volumes: - ./nginx.conf:/etc/nginx/nginx.conf - ./conf.d:/etc/nginx/conf.d - ./log:/var/log/nginx
    - ./wwwroot:/usr/share/nginx/wwwroot
docker-compose up -d
docker-compose down

 

原文地址:https://www.cnblogs.com/yjp372928571/p/12736621.html