Skip to content

About

Shields.io in a Docker image 🐳

Topics

Resources

Stars

18 stars

Watchers

3 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

GitHub Workflow Status Docker Pulls Docker Stars Docker Image Size (tag) Shields upstream license Docker Hub tag Docker Hub last push CalVer Beevelop

Shields.io in Docker

Self-host Shields.io to render badges for your projects. The image uses the upstream tagged server release, runs as the node user, and serves HTTP on port 80. The release workflow builds for linux/amd64 and linux/arm64.

Run the image

docker run --rm --name shields -p 127.0.0.1:8080:80 beevelop/shields:latest

Open a sample SVG badge to verify the server. Pin a specific image tag or digest in production.

Run with Varnish

Clone this repository and use Docker Compose v2.24 or newer. Compose builds Shields from the checkout and publishes the Varnish frontend on loopback by default.

docker compose up --build --wait
curl -fsS http://127.0.0.1:8080/badge/self_hosted-passing-brightgreen.svg

Set SHIELDS_HOST_PORT and SHIELDS_BIND_ADDR to override the frontend mapping. Set VIRTUAL_HOST if an existing reverse proxy uses it for discovery. The Varnish service reaches Shields on the Compose network at shields:80.

Configuration

Pass settings using docker run --env-file or create an optional shields.env file beside docker-compose.yml. Keep credential files private.

Variable Behavior
INFOSITE Legacy root redirect. Defaults to http://shields.io. Set it to an empty value to let Shields serve its local homepage.
REDIRECT_URI Upstream root redirect. A nonempty value takes precedence over INFOSITE.
GH_TOKEN Optional GitHub token for badge lookups, with only the permissions your badges need.
GH_CLIENT_ID, GH_CLIENT_SECRET Legacy GitHub OAuth settings. Leave them unset for anonymous use. Most self-hosted instances use GH_TOKEN for authenticated GitHub requests.
RASTER_URL Optional URL of a separately hosted raster server. Shields redirects PNG badge requests there.
DYNAMIC_AND_ENDPOINT_BADGES_ENABLED Set to false on public deployments that can reach private network resources to disable badges that fetch requester-provided URLs.

See the upstream self-hosting guide and server secrets reference for additional options. For a direct container run, use PORT and a matching port mapping if your platform requires an unprivileged listener such as 8080. The included Compose stack uses port 80 internally.

Upgrade from the legacy image

Existing SVG badge URLs and host mappings to container port 80 continue to work. Use a sample badge or set INFOSITE= to reach the frontend at / in place of the old /try.html page. For PNG output, deploy a compatible Squint raster server, point it at this Shields instance using its BASE_URL, and set the Shields RASTER_URL to the raster server URL.

The stack uses Docker Compose networking and the official Varnish image. Migrate old Docker links to the Compose service name or a shared Docker network. Credentials are consumed from the upstream environment settings.

Build and verify

docker build -t shields:local .
bash .github/scripts/smoke.sh shields:local

GitHub Actions verifies both architectures and the Compose stack on pull requests. Default-branch builds publish beevelop/shields:latest after validation.

For a versioned release, push a Git tag in the CalVer format vYYYY.MM.MICRO, such as v2026.12.1. Start at 1 for the first release of the month and increment MICRO for each additional release that month. The workflow publishes the same tag on Docker Hub for linux/amd64 and linux/arm64. Publishing uses the repository's DOCKERHUB_USERNAME and DOCKERHUB_TOKEN Actions secrets.

All Docker images

Badge Docker Hub Build Status Published Release / Tag License
beevelop/base beevelop/base Docker Hub pulls
beevelop/base Docker Hub stars
beevelop/base latest image size
beevelop/base build status beevelop/base GitHub release date beevelop/base latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/base license
beevelop/java beevelop/java Docker Hub pulls
beevelop/java Docker Hub stars
beevelop/java latest image size
beevelop/java build status beevelop/java GitHub release date beevelop/java latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/java license
beevelop/android beevelop/android Docker Hub pulls
beevelop/android Docker Hub stars
beevelop/android latest image size
beevelop/android build status beevelop/android GitHub release date beevelop/android latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/android license
beevelop/android-nodejs beevelop/android-nodejs Docker Hub pulls
beevelop/android-nodejs Docker Hub stars
beevelop/android-nodejs latest image size
beevelop/android-nodejs build status beevelop/android-nodejs GitHub release date beevelop/android-nodejs latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/android-nodejs license
beevelop/cordova beevelop/cordova Docker Hub pulls
beevelop/cordova Docker Hub stars
beevelop/cordova latest image size
beevelop/cordova build status beevelop/cordova GitHub release date beevelop/cordova latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/cordova license
beevelop/ionic beevelop/ionic Docker Hub pulls
beevelop/ionic Docker Hub stars
beevelop/ionic latest image size
beevelop/ionic build status beevelop/ionic GitHub release date beevelop/ionic latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/ionic license
beevelop/nginx-basic-auth beevelop/nginx-basic-auth Docker Hub pulls
beevelop/nginx-basic-auth Docker Hub stars
beevelop/nginx-basic-auth latest image size
beevelop/nginx-basic-auth build status beevelop/nginx-basic-auth GitHub release date beevelop/nginx-basic-auth latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/nginx-basic-auth license
beevelop/claude beevelop/claude Docker Hub pulls
beevelop/claude Docker Hub stars
beevelop/claude latest image size
beevelop/claude build status beevelop/claude GitHub release date beevelop/claude latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/claude license
beevelop/nodejs beevelop/nodejs Docker Hub pulls
beevelop/nodejs Docker Hub stars
beevelop/nodejs latest image size
beevelop/nodejs build status beevelop/nodejs GitHub release date beevelop/nodejs latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/nodejs license
beevelop/nodejs-python beevelop/nodejs-python Docker Hub pulls
beevelop/nodejs-python Docker Hub stars
beevelop/nodejs-python latest image size
beevelop/nodejs-python build status beevelop/nodejs-python GitHub release date beevelop/nodejs-python latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/nodejs-python license
beevelop/uniqush beevelop/uniqush Docker Hub pulls
beevelop/uniqush Docker Hub stars
beevelop/uniqush latest image size
beevelop/uniqush build status beevelop/uniqush GitHub release date beevelop/uniqush latest GitHub release
CalVer YYYY.MM.MICRO
beevelop/uniqush license
beevelop/shields beevelop/shields Docker Hub pulls
beevelop/shields Docker Hub stars
beevelop/shields latest image size
beevelop/shields build status beevelop/shields last pushed to Docker Hub beevelop/shields latest Docker Hub tag Shields upstream license

Use tags where possible, because

One does not simply use latest

About

Shields.io in a Docker image 🐳

Topics

Resources

Stars

18 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages