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/nginxdocker-compose up -ddocker-compose down

相关推荐