Docker images for running Jekyll with the
official Ruby image family and Docker Buildx Bake. The images keep the
long-standing /srv/jekyll workdir, expose Jekyll's default
development ports, and follow the official Ruby image
pattern of running as root by default.
| Image | Purpose |
|---|---|
jekyll/jekyll |
Default image with Jekyll and common community gems. |
jekyll/jekyll:pages |
GitHub Pages-compatible image using versions from docker-bake.hcl. |
jekyll/builder and jekyll/minimal are archived and
no longer built or published. Their final release was
4.4.1; existing latest, 4, and 4.4 tags for those
images should be treated as aliases of that final release.
Build a site in the current directory:
docker run --rm \
--volume "$PWD:/srv/jekyll" \
jekyll/jekyll \
jekyll buildServe a site locally:
docker run --rm \
--volume "$PWD:/srv/jekyll" \
--publish 4000:4000 \
--publish 35729:35729 \
jekyll/jekyll \
jekyll serve --host 0.0.0.0 --livereloadOn Docker Desktop for Windows or other bind mount setups where host file changes do not trigger rebuilds, use Jekyll's polling watcher:
docker run --rm \
--volume "$PWD:/srv/jekyll" \
--publish 4000:4000 \
--publish 35729:35729 \
jekyll/jekyll \
jekyll serve --host 0.0.0.0 --livereload --force_pollingRun Bundler explicitly when your project has a Gemfile:
docker run --rm \
--volume "$PWD:/srv/jekyll" \
jekyll/jekyll \
bundle install
docker run --rm \
--volume "$PWD:/srv/jekyll" \
jekyll/jekyll \
bundle exec jekyll buildFor Linux bind mounts, use Docker's standard --user
flag when you want generated files to be owned by your
host user:
docker run --rm \
--user "$(id -u):$(id -g)" \
--volume "$PWD:/srv/jekyll" \
jekyll/jekyll \
jekyll buildFor rootless Podman, do not pass Docker's --user
flag. Run the image as-is so Podman maps container root to
your host user:
podman run --rm \
--volume "$PWD:/srv/jekyll" \
docker.io/jekyll/jekyll \
jekyll buildThe images do not install operating-system packages at runtime. Build a project-specific image when your site needs additional Debian packages:
FROM jekyll/jekyll
RUN apt-get update \
&& apt-get install -y --no-install-recommends graphviz \
&& rm -rf /var/lib/apt/lists/*The default image includes Node.js and pnpm. Corepack
package managers are configured per target in
docker-bake.hcl.
Build every image target:
docker buildx bakeBuild and load a single target locally:
docker buildx bake --load jekyll
docker buildx bake --load pagesRun the smoke test suite:
script/test jekyll amd64
script/test pages amd64Refresh GitHub Pages versions in docker-bake.hcl:
script/updatescript/update downloads
https://pages.github.com/versions.json
and updates the Pages-related Bake
variables:
PAGES_RUBY_VERSIONPAGES_JEKYLL_VERSIONGITHUB_PAGES_VERSION