-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerized build environment & scripts #31
base: main
Are you sure you want to change the base?
Conversation
@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! 🎉 |
@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 |
7ca378b
to
17ded15
Compare
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some very minor conflicts in the README.md
that need to be handled before merging, but aside from that, this looks good to me!
This PR contains
bin/build-container
, a script which builds a Jekyll container using the local GemfileDockerfile
, which provides further build instructions to Dockerbin/serve
, a script which serves the site using the built containerMotivation
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