styles
styles copied to clipboard
Docker config files for Jekyll build environment
Over in the python-novice-gapminder lesson, @alee developed a dockerfile which can be used to bring in the Jekyll dependencies if you have a working.
In https://github.com/swcarpentry/python-novice-gapminder/issues/120, @alee closed the issue and mentioned that it would be better over here in swcarpentry/styles. This issue serves to capture that over here so we can consider it for inclusion.
I like the idea of a Docker config file but so far we didn't enforce instructors to use a specific version of any library. Having a Docker file will change this and add the extra work to change the Docker file when a new version is available.
In addition to that, changes to Instructor Training will be required. @ErinBecker How much do you think this will impact Instructor Training?
@swcarpentry/r-maintainers @swcarpentry/python-maintainers How much important do you think is to have the Docker config files now? I want to leave it for the second semester as part of other changes that I want to suggest.
I think this should be an optional thing, it is faster to install & set up if you have docker + docker-compose installed but that isn't trivial either and only available for those running newer OSes.
I ran into an issue on Tuesday during my final maintainer onboarding session with Erin where I was following these steps to install Jekyll: https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/#step-2-install-jekyll-using-bundler - however, the github-pages plugin prevented jekyll serve
from running successfully (spitting out exceptions about invalid repository metadata). This is easily reproducible by switching the base jekyll docker image from jekyll:3 to jekyll:pages
I'm happy to maintain the Dockerfile
or docker-compose.yml
for this if needed. We could also do away with the Dockerfile
entirely and only use docker-compose. docker-compose
provides a simpler interface to docker without having to remember all the command-line arcana for mounting volumes, port mapping etc.
The Docker config branch is over at https://github.com/alee/python-novice-gapminder/tree/docker
I find installing/configuring Ruby to be a disaster, I fully support standardized Docker instance to fix this.
I just ran into a whole mess of issues trying to install Ruby and necessary deps to get Jekyll working properly on Mac OS Mojave. I was eventually able to solve the problem by manually installing XCode command line tools (why this was necessary is not clear). I then thought about using Docker. Ran the following command and was up and running in about 1 minute.
export JEKYLL_VERSION=3.8
docker container run --rm \
--volume="$PWD:/srv/jekyll" \
--port 4000:4000 \
-it jekyll/jekyll:$JEKYLL_VERSION \
make serve
This may not be the best way and I am sure that docker-compose
would simplify things even more.