A pre-built, multi-arch Docker image that serves your Markdown docs with the official docsify-cli. The image is rebuilt automatically whenever a new docsify-cli is released, so you always get an up-to-date server without installing anything locally.
Published to both registries:
- GHCR β
ghcr.io/rockbenben/docsify-server - Docker Hub β
rockben/docsify-server
- π Effortless docs β write Markdown, mount it, and Docsify serves it with style.
- π³ Zero install β just pull the image; no Node.js or npm on the host.
- ποΈ Multi-arch β built for
linux/amd64andlinux/arm64(Apple Silicon, Raspberry Pi, etc.). - π Auto-update β a monthly GitHub Actions job checks npm for a new
docsify-clirelease and only rebuilds when there is one (or when triggered manually). - π Zero-config first run β new to Docsify? Mount an empty folder and the container scaffolds a ready-to-edit starter site for you (see below), so you never hit a cryptic "No docs found" crash.
- π΄ Works offline β the scaffolded site bundles its assets (search, TOC, image zoom, word count) inside the image; no CDN required.
- π©Ί Health check β the container reports healthy once the server responds on port
3000.
| Tag | Meaning |
|---|---|
latest |
The newest build. |
<x.y.z> |
The latest build for a given docsify-cli version (e.g. 4.4.4) β handy for staying on one Docsify line. |
The version tag mirrors the docsify-cli version bundled in that image, so docsify-server:4.4.4 ships docsify-cli@4.4.4.
Both
latestand the version tag are rolling. A rebuild β whether a newdocsify-clirelease or a change to this repo's image β republishes the same tag with fresh contents. If you need a byte-for-byte reproducible deployment, pin by image digest instead, e.g.ghcr.io/rockbenben/docsify-server@sha256:β¦.
Docker installed on your machine.
Place your Markdown files in a local ./docs directory, then create docker-compose.yml:
services:
docsify:
container_name: docsify-server
image: ghcr.io/rockbenben/docsify-server:latest
volumes:
- ./docs:/docs
ports:
- "8080:3000"
restart: unless-stoppedStart it:
docker compose up -d# GHCR
docker run -d -p 8080:3000 -v "$(pwd)/docs:/docs" --name docsify-server ghcr.io/rockbenben/docsify-server:latest
# Docker Hub
docker run -d -p 8080:3000 -v "$(pwd)/docs:/docs" --name docsify-server rockben/docsify-server:latestThen open http://localhost:8080.
The container serves whatever is mounted at
/docson port3000; the examples map it to host port8080.
Docsify needs an index.html entry point. To keep first-time use painless, the container inspects /docs on startup:
| What you mount | What happens |
|---|---|
| Empty folder | A complete offline example site (index.html + bundled assets/ + a bilingual README.md) is scaffolded so you have a working, editable example immediately. |
Markdown files, no index.html |
An index.html + assets/ are added; your existing .md files are never overwritten. |
Your own index.html |
Left completely untouched β bring your own Docsify config and nothing is changed. |
The scaffolded files are just a starter example to get you going and show the format β edit or replace them freely. Once an index.html exists in /docs, the container never touches your folder again (upgrading the image won't overwrite anything). If you ever want to regenerate the example, delete /docs/index.html and restart.
Set DOCSIFY_AUTO_INIT=false for strict behaviour β the container will not scaffold anything, and will exit with Docsify's usual message if no index.html is present:
docker run -d -p 8080:3000 -e DOCSIFY_AUTO_INIT=false -v "$(pwd)/docs:/docs" ghcr.io/rockbenben/docsify-server:latestThe docker.yml workflow runs on three triggers: a monthly schedule, a push to main that changes the image (Dockerfile, entrypoint, template, β¦), and manual dispatch. It has two jobs:
- check β reads the latest
docsify-cliversion from npm and compares it with the last published image tag. It setsshould_build=truewhen there is a newer version, or whenever the run is a push/manual dispatch (so changes to this repo's own image always publish). A scheduled run with no newdocsify-cliversion is skipped. - build β only runs when
should_build=true; it builds the multi-arch image and pushes the version tag +latestto both GHCR and Docker Hub.
To force a rebuild at any time, trigger the workflow manually via Actions β Build and Push Docker Image β Run workflow.
docker build -t docsify-server .
docker run -d -p 8080:3000 -v "$(pwd)/docs:/docs" docsify-serverThe image is based on node:lts-alpine and installs docsify-cli@latest at build time.