Since I’ve been playing around with Jekyll I’ve spent hours messing around on both Mac and Windows trying to get Ruby installed so I can run Jekyll natively from within the terminal in VSCode - ultimately with the aim of running a basic web server on my laptop..
Rather than mess around with installing homebrew, Ruby and any number of dependencies, I found the following repo on github – with a prebuilt Jekyll server with all the added extras already installed and pre-configured.. Go Internet!
The instructions are very simple and straightforward:
docker-compose.yml contents:
services:
jekyll:
image: bretfisher/jekyll-serve
volumes:
- .:/site
ports:
- '4000:4000'
The docker image is built to scan and auto update files each time they are saved, allowing you to speed up your workflow.
The usual caveats apply, so if you edit your _config.yml file then you’ll need to exit the container with a CTRL-C and re-run docker-compose up to reload.
Credits: