This image was created to facilitate development and of static sites generated by Jekyll and served by OpenResty. For people without Ruby experience, getting up and running with Jekyll for the first time may be challenging. This image attempts to remove some of that complexity by providing a functional base. This image was built to suit a specific need and may not include features that may be obvious to more experienced users. Pull requests welcome!
This image provides
- RVM for managing ruby version
- Ruby for Jekyll and it's plugins
- Bundler for managing Jekyll dependencies
- Node.js for bower
- OpenResty for serving the compiled site
I've made a best effort to keep this image as small as possible. For Ruby, this is proving to be difficult to accomplish. It is important to me that the image remain highly portable without huge bandwidth overhead. This is an ongoing effort.
The Makefile is an attempt to provide a painless workflow.
You'll notice that HEAD points to a develop branch. Consequently, pull requests against master will not be accepted. I am attempting to force myself to adhere to gitflow.
You can build the image with make build
. For local development you may want to change the image tag information at the top of the Makefile to prevent pulling in a public release.
This image is unit tested using the excellent Bash Automated Testing System.
You can run the tests with make test
You are of course free to use the normal docker exec
methods to execute a bash shell. I liked the method the phusion base image took with dynamically enabling an insecure SSH server.
After you build
the image, you may log into the image with make ssh
. If a container with the build
tag is not currently running, the Makefile will create one for you. If the container is created by the Makefile, it will stop and remove it after you exit the SSH session. If the a container is already running, the Makefile will use exec
to enable it's SSHD service and ssh into it. In this case, it will not remove the already running container.
NOTE: This was never meant to live on the public internet. If you execute the ssh
make target on an already running container, it will enable an insecure SSH key that is stored in this repository. It is NOT wise to put this container on the public internet or any untrusted networks.
- Sometimes exiting an SSH session initiated with
make ssh
by using ctrl-d causes ssh to exit with a non-zero return code. I have not figured out why this happens yet, but if it it happens to you; know that the container will be left running in the background. For now, it is a manual process to destroy the image. An annoying work around is simply runningexit
instead of the shorthand. - Currently the Makefile does not recover from failed builds. It is a manual process to remove the failed build container and then remove the untagged image.
A lot of code and inspiration was borrowed from the phusion baseimage