Sometimes you just need a static website or webpage, and you want to enable yourself or someone else to edit it without having to know or remember the magic script to fire up a local webserver. This reduces it to a one liner, and an easy one to remember at that.
COPY . /usr/share/nginx/html
version: '2' services: web: build: . ports: - "8000:80" volumes: - ./:/usr/share/nginx/html
You will now have a webserver running at http://localhost:8000/ with your changes visible on a refresh. Wanted: Got a lightweight way to enable hot reloading in the browser for a docker-based static website dev workflow?