Docker lets you run the Academic Pages Jekyll environment in a self-contained container, so you never need to install Ruby, Bundler, or Node.js directly on your machine. The repository ships with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/academicpages/academicpages.github.io/llms.txt
Use this file to discover all available pages before exploring further.
Dockerfile, a docker-compose.yaml, and a _config_docker.yml override file that together handle building the image, mounting your source files, and serving the site at localhost:4000.
Prerequisites
You need Docker installed and running on your machine. Docker Desktop is the easiest option on macOS and Windows; on Linux you can install the Docker Engine package for your distribution.Building and Running the Site
Set file permissions
Before starting the container, make all files in the repository world-readable and world-writable. This prevents permission mismatches between your host user and the container’s
vscode user (UID/GID 1000):Start the container with Docker Compose
Build the image (first run only) and start the Jekyll server:Docker will:
- Build the image from the
Dockerfileusingruby:3.2as the base. - Install
build-essentialandnodejsinside the image. - Run
bundle installto install all gems fromGemfile. - Mount your local repository into
/usr/src/appinside the container. - Start Jekyll and begin serving the site.
Dockerfile or Gemfile changes.How docker-compose.yaml Is Configured
The fulldocker-compose.yaml in the repository root is:
| Field | Value | Effect |
|---|---|---|
volumes | .:/usr/src/app | Bind-mounts your local repository so file edits take effect inside the running container without a rebuild |
ports | 4000:4000 | Forwards localhost:4000 on your machine to port 4000 inside the container |
user | 1000:1000 | Runs Jekyll as UID/GID 1000 (the vscode user created in the Dockerfile) |
environment | JEKYLL_ENV=docker | Sets the Jekyll environment variable to docker |
command | jekyll serve -H 0.0.0.0 -w --config _config.yml,_config_docker.yml | Serves on all interfaces with watch mode enabled, loading both config files |
-w flag enables watch mode, which makes Jekyll automatically rebuild pages when it detects changes to Markdown and HTML files in the mounted volume.
Jekyll binds to
0.0.0.0 inside the container (not localhost) so that Docker’s port forwarding can reach it. This is different from the Ruby/Jekyll local setup, which binds to localhost directly.The _config_docker.yml Override File
When running via Docker Compose, Jekyll loads two configuration files in sequence:_config_docker.yml override matching keys in _config.yml. The override file contains a single setting:
url field that is normally set to your GitHub Pages hostname in _config.yml (for example, https://yourusername.github.io). Clearing url ensures that internal links resolve correctly against localhost:4000 when previewing locally, rather than pointing at your live GitHub Pages domain.
VS Code DevContainer Workflow
The repository includes a.devcontainer/devcontainer.json that hooks into the same docker-compose.yaml to give you a fully integrated local development experience inside VS Code.
devcontainer.json reuses the jekyll-site service defined in docker-compose.yaml, sets the remote workspace to /usr/src/app, and forwards port 4000 to your host automatically.
Open the DevContainer in VS Code
Open the cloned repository folder in Visual Studio Code.VS Code typically detects the
.devcontainer folder and prompts you to reopen in the container. If the prompt does not appear, open the command palette with F1 and select DevContainers: Reopen in Container.Wait for the container to build
VS Code builds the Docker image (first run only), installs extensions inside the container, and connects your editor to the container environment. This may take a few minutes on the first run.
Changes to
_config.yml require restarting the Jekyll process even in the DevContainer. To restart, open a terminal inside the container in VS Code and run docker compose restart, or stop and reopen the container via the command palette.