• Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

VideoJS – multiple source demo

2022-03-08

Add custom field to Woocommerce tab

2022-03-07

Surror Product Tabs for WooCommerce

2022-03-07
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
SEO & Website build tips SEO & Website build tips
  • Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact
SEO & Website build tips SEO & Website build tips
Home»virtualization»run jekyll on docker
virtualization

run jekyll on docker

OxfordBy Oxford2022-01-06No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Jekyll Docker

Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll

Image Types

  • jekyll/jekyll: Default image.
  • jekyll/minimal: Very minimal image.
  • jekyll/builder: Includes tools.

Standard

The standard images (jekyll/jekyll) include a default set of “dev” packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image.

Usage

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  -it jekyll/jekyll:$JEKYLL_VERSION \
  jekyll build

Builder

The builder image comes with extra stuff that is not included in the standard image, like lftp, openssh and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI.

Usage

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  -it jekyll/builder:$JEKYLL_VERSION \
  jekyll build

Minimal

The minimal image skips all the extra gems, all the extra dev dependencies and leaves a very small image to download. This is intended for people who do not need anything extra but Jekyll.

Usage

You will need to provide a .apk file if you intend to use anything like Nokogiri or otherwise, we do not install any development headers or dependencies so C based gems will fail to install.

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  -it jekyll/minimal:$JEKYLL_VERSION \
  jekyll build

Server

For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser.

Usage

docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  --publish [::1]:4000:4000 \
  jekyll/jekyll \
  jekyll serve

Dependencies

Jekyll Docker will attempt to install any dependencies that you list inside of your Gemfile, matching the versions you have in your Gemfile.lock, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing gem "jekyll", "~> 3.8" so that minor versions are installed if you use say image tag “3.7.3”).

Updating

If you provide a Gemfile and would like to update your Gemfile.lock you can run

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  -it jekyll/jekyll:$JEKYLL_VERSION \
  bundle update

Caching

You can enable caching in Jekyll Docker by using a docker --volume that points to /usr/local/bundle inside of the image. This is ideal for users who run builds on CI’s and wish them to be fast.

My Gems Aren’t Caching

If you do not diverge from the default set of gems we provide (read: add Gems to your Gemfile that aren’t already on the image), then bundler by default will not create duplicates, and cache. It will simply rely on what is already installed in $GEM_HOME. This is the default (observed… but unconfirmed) behavior of bundle when using $GEM_HOME w/ $BUNDLE_HOME

Usage

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  --volume="$PWD/vendor/bundle:/usr/local/bundle" \
  -it jekyll/jekyll:$JEKYLL_VERSION \
  jekyll build

The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the _config.yml exclude array setting.

Configuration

You can configure some pieces of Jekyll using environment variables, what you cannot with environment variables you can configure using the Jekyll CLI. Even with a wrapper, we pass all arguments onto Jekyll when we finally call it.

ENV Var Default
JEKYLL_UID 1000
JEKYLL_GID 1000
JEKYLL_DEBUG, ""
VERBOSE ""
FORCE_POLLING ""

If you would like to know the CLI options for Jekyll, you can visit Jekyll’s Help Site

Packages

You can install system packages by providing a file named .apk with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. We provide many dependencies for most Ruby stuff by default for builder and standard images. This includes ruby-dev, xml, xslt, git and other stuff that most Ruby packages might need.

Building

script/build
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

Compile a Jekyll project without installing Jekyll or Ruby by using Docker

2022-01-07

Add and Use ISO Library Storage Repository in Xen XCP-ng

2021-12-26
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
January 2022
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Dec   Mar »
Tags
app branding culture design digital Docly docs etc faq fashion featured fitness fix github Helpdesk Image issue leisure lifestyle magento Manual marketing memecached Photography picks planing seo sequrity tips Travel trending ui/ux web WordPress 爬虫
Editors Picks

Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

2021-01-05
Top Reviews
8.9

Which LED Lights for Nail Salon Safe? Comparison of Major Brands

By Oxford
8.9

Review: Xiaomi’s New Loudspeakers for Hi-fi and Home Cinema Systems

By Oxford
70

CES 2021 Highlights: 79 Top Photos, Products, and Much More

By Oxford
Advertisement
Demo
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
About Us
About Us

Your source for the lifestyle news. This demo is crafted specifically to exhibit the use of the theme as a lifestyle site. Visit our main page for more demos.

We're accepting new partnerships right now.

Email Us: [email protected]
Contact: +1-320-0123-451

Facebook Twitter Instagram Pinterest YouTube LinkedIn
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
From Flickr
Ascend
terns
casual
riders on the storm
chairman
mood
monument
liquid cancer
blue
basement
ditch
stars
© 2025 Designed by 九号资源网.

Type above and press Enter to search. Press Esc to cancel.