gramr stops once the image is pushed. Running it is up to your infrastructure: this page explains what the image contains and how to use its tags.

The image

The image built by the Dockerfile of gramr init serves the site with static-web-server on port 80. It contains only the built site: no notes, no Git history.

docker run -d -p 80:80 registry.example.com/sites/blog:latest

With Docker Compose:

services:
  blog:
    image: registry.example.com/sites/blog:latest
    ports:
      - "80:80"
    restart: unless-stopped

To update automatically on each publish, use a tool that watches the registry (Watchtower, a registry webhook, a Kubernetes image updater…).

Tags

Each publish pushes several tags:

TagMeaning
<version> (12 characters, e.g. f409b6c609a0)This exact state of the site. Immutable.
latestThe last published version.
git-<sha> (12 characters)The commit of the site repository, when it is known exactly.

Rolling back means running an older <version> tag.

The version is a hash of every file that goes into the image: notes, templates, stylesheets, Dockerfile. Any change gives a new version; publishing the same thing twice gives the same version.

The git-<sha> tag is only pushed when the commit is known exactly: always for a remote repository, never for a local folder with uncommitted changes or without Git. Several versions can share it, since notes change independently of the site.

Labels

The image carries OCI labels, useful to know what is running:

LabelValue
org.opencontainers.image.titleSite name
org.opencontainers.image.versionFull version
org.opencontainers.image.revisionFull commit SHA, when known
org.opencontainers.image.sourceRepository URL, for remote repositories

Several platforms

To build for another machine, for example a Raspberry Pi, set the platforms in gramr.toml:

[build]
platforms = ["linux/amd64", "linux/arm64"]

The generated Dockerfile builds the site on your machine and only the final image per platform, so no emulation is needed for Zola itself. gramr doctor checks that your Docker supports multi-platform builds.