How do I mount a host directory as a volume in docker compose

前端 未结 5 1392
时光取名叫无心
时光取名叫无心 2020-12-07 08:59

I have a development environment I\'m dockerizing and I would like the ability to livereload my changes without having to rebuild docker images. I\'m using docker compose be

5条回答
  •  青春惊慌失措
    2020-12-07 09:46

    Checkout their documentation

    From the looks of it you could do the following on your docker-compose.yml

    volumes:
        - ./:/app
    

    Where ./ is the host directory, and /app is the target directory for the containers.

提交回复
热议问题