Bind Mounts
Assignment
- Use a Jekyll "Static Site Generator" to start a local web server
- Don't have to be web developer: this is example of bridging the gap between local file access and apps running in container
- source code is in the course repo under
bindmount-sample-1
- We edit files with editor on our host using native tools
- Container detects changes with host files and updates web server
- start container with
docker run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve
- Refresh our browser to see changes
- Change the file in
_posts/
and refresh browser to see changes
Solution
docker run -p 80:4000 -v D:\Programovanie\Github\udemy-docker-mastery\bindmount-sample-1:/site bretfisher/jekyll-serve
Then I just edited files locally in VS Code and checked changes in browser.