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

 

 

 

posted @ 2020-04-20 11:15  RandomObject  阅读(4121)  评论(0编辑  收藏  举报