in root.html). Outputs custom og:image with assets_prefix normalisation and non-Google site verification. --> Docker for Jekyll Development: A Complete Guide | zer0-mistakes in _layouts/root.html. What this file adds: - Custom og:image with preview_images.assets_prefix path normalisation for the theme-specific page.preview and page.header.og_image keys. When page.image is set, jekyll-seo-tag handles og:image and this file skips its own og:image output to avoid duplicate tags. - Non-Google site verification tags (Bing, Yandex, Naver, Baidu) Dependencies: - jekyll-seo-tag plugin (loaded in _layouts/root.html via Docker for Jekyll Development: A Complete Guide | zer0-mistakes ) - site.preview_images config in _config.yml =================================================================== --> Docker for Jekyll Development: A Complete Guide | zer0-mistakes Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-04-13 14:33 UTC
Current Environment Production
Build Time Apr 13, 14:33
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Quick Links
Page Location
Page Info
Layout article
Collection posts
Path _posts/2025-01-15-docker-jekyll-guide.md
URL /posts/2025/01/15/docker-jekyll-guide/
Date 2025-01-15
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Docker for Jekyll Development: A Complete Guide

Docker has revolutionized how developers work with Jekyll sites. This comprehensive guide will walk you through setting up an optimized Docker development environment for your Jekyll projects.

Why Use Docker for Jekyll?

Docker provides a consistent development environment across all platforms:

  • Cross-platform compatibility: Works the same on Windows, macOS, and Linux
  • No Ruby installation required: All dependencies are containerized
  • Consistent builds: Eliminate “it works on my machine” issues
  • Easy team onboarding: New developers can start immediately

Setting Up Your Docker Environment

Here’s a basic docker-compose.yml configuration:

version: "3.8"
services:
  jekyll:
    image: jekyll/jekyll:latest
    platform: linux/amd64
    ports:
      - "4000:4000"
    volumes:
      - .:/srv/jekyll
    environment:
      - JEKYLL_ENV=development
    command: jekyll serve --watch

Essential Docker Commands

Start your development server:

docker-compose up

Build your site:

docker-compose exec jekyll jekyll build

Best Practices

  1. Use volume mounts for live reloading
  2. Specify platform for Apple Silicon compatibility
  3. Set environment variables for development vs production
  4. Keep containers lightweight with minimal dependencies

Docker makes Jekyll development a breeze. Start containerizing your workflow today!