Skip to content

astillero/jekyll

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jekyll on Docker

All the goodness from Jekyll, zero gems hassle

This tool provides a container-as-a-binary that will pass every option it is run with to the underlying ephemeral container where Jekyll is really installed.

Requirements

  • Docker

Installation

Use make:

usage: make install
       make uninstall
Make target Description Example
make install Build the image and install the binary
$ make install
docker-compose build
Building jekyll
Step 1/8 : FROM ruby:alpine3.7
...
Successfully built
Successfully tagged astillero_jekyll:latest
install -m 0755 bin/jekyll /usr/local/bin/jekyll
$

Usage

$ jekyll --version
jekyll 3.8.1
$

Custom gems

If there's a Gemfile in the folder this binary is ran into, bundle install will be executed before anything else – effectively preparing the ephemeral container with a very specific set of gems.

$ cd ~/my_project
$ echo "gem 'pygments.rb', '~> 0.6.3'" >> Gemfile
$ jekyll serve -w
Fetching gem metadata from https://rubygems.org/..............
Fetching pygments.rb 0.6.3
Installing pygments.rb 0.6.3
Bundle complete!
Bundled gems are installed into `/usr/local/bundle`
Configuration file: /opt/app/_config.yml
            Source: /opt/app
       Destination: /opt/app/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 2.762 seconds.
 Auto-regeneration: enabled for '/opt/app'
    Server address: http://0.0.0.0:4000
  Server running... press ctrl-c to stop.

Author

Mario Álvarez [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 50.9%
  • Makefile 49.1%