docker-compose.local.yml
version: '3.3' services: web: build: context: ./web dockerfile: Dockerfile ports: - 8080:80 volumes: - ./web/html:/usr/share/nginx/html
/web/Dockerfile
From nginx:1.17.5-alpine COPY ./html/ /usr/share/nginx/html/ CMD ["nginx", "-g", "daemon off;"]
/web/html/index.html
<title>Document</title> </head> <body> <h1>hello</h1> </body>
$ sudo docker-compose -f docker-compose.local.yml up -d –build