docker-compse 启动nginx

2021-01-13  本文已影响0人  95加不满

模板如下:

# docker-compose-nignx.yaml
version: '2'

services:
  nginx:
    container_name: bigscreen
    image: nginx:latest
    restart: always
    volumes:
      - ./www:/usr/share/nginx/html
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./logs:/var/log/nginx
    ports:
      - "1234:80"

启动命令:
docker-compose -f docker-compose-nignx.yaml up -d

上一篇 下一篇

猜你喜欢

热点阅读