releases
releases copied to clipboard
Add Dockerized build environment & scripts
This PR contains
-
bin/build-container
, a script which builds a Jekyll container using the local Gemfile -
Dockerfile
, which provides further build instructions to Docker -
bin/serve
, a script which serves the site using the built container - updates to the README explaining how to use the above
Motivation
By managing dependencies in containers, I avoid package version conflicts on my machine and I can present easily reproducible build and test instructions to others.
Dependencies
This PR adds an optional dependency on Docker.
How to test
Notice that there's a new sub-header under "Building" in the README. Check out this branch and follow the instructions there to build a container and serve the site. This should succeed with no errors.
I tested this with Docker version 19.03.8, build afacb8b7f0
@cassidyjames Is this of interest? I cannot do anything with this PR.
There's an official docker image that I think would be better used if this is something we want to pursue.
That said it works well! :tada:
@RMcNeely which official docker image do you mean? Happy to update this PR if I can make it more useful.
This is the one referenced in the Jekyll docs: https://hub.docker.com/u/jekyll Personally I like the idea of Docker files for the web sites but I would really want it for the main website so I don't have to manage PHP. RVM is perfectly usable but Dockerfiles are nice
@RMcNeely updated this PR to use your recommended base image & re-verified that it works with the provided script setup.
Happy to work on giving the main website the same treatment, should I open an issue in https://github.com/elementary/website/?
Well elementary/website is the one thing that is not actually based on Jekyll so that one would be more involved (needs both NodeJS and PHP Composer) but I do think it's worth doing. The other Jekyll based sites should be similar to this.
Is there a list of all the Jekyll-based websites? I can probably do those similar to this one, and work on a separate custom container image for the main website.
Not that I'm aware of. Off the top of my head it's appcenter-web, releases, blog and technically edw but there may be others.