- '.:/usr/src/app'
(under base
) will mount your project dir .
into the container(s) path /usr/src/app
. This way both your host machine and container(s) see the same files and any changes will persist on your host machine after container has terminated. Additionally there’s a separate volume for Maven cache, which you want to share between your containers (otherwise maven downloads dependencies each time you execute lein commands). Volume(s) defined at the bottom will ‘survive’ until they’re explicitly deleted.
docker-compose run lein <args>
executes any lein tasks. Example:docker-compose run lein clean
docker-compose up figwheel
fires up figwheel which will be accessible from host on port 3449. (ctrl-c will quit). You need to useup
instead ofrun
because run doesn’t allocate port mappings and therefore you’d never be able to access index.html from your host machines browser.docker-compose run shell
starts a bash session in container, for exploring and fu