Skip to content

Docker

semrel is available as an official Docker image at ghcr.io/SemRels/semrel.

TagBaseIncludesNotes
ghcr.io/SemRels/semrel:latestdistroless (Debian 12)git, ca-certificatesNo shell, no package manager. Recommended default.
ghcr.io/SemRels/semrel:1.0.0distroless (Debian 12)git, ca-certificatesVersion-pinned
ghcr.io/SemRels/semrel:latest-alpineAlpine 3.22git, ca-certificates, openssh-client, shellUse when SSH or shell scripting is needed
ghcr.io/SemRels/semrel:1.0.0-alpineAlpine 3.22git, ca-certificates, openssh-client, shellVersion-pinned Alpine
ghcr.io/SemRels/semrel:latest-actionAlpine 3.22git, ca-certificates, openssh-client, shellGitHub Docker container actions only
ghcr.io/SemRels/semrel:1.0.0-actionAlpine 3.22git, ca-certificates, openssh-client, shellVersion-pinned GitHub Actions image
Terminal window
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e SEMREL_PLUGIN_TOKEN="$GITHUB_TOKEN" \
ghcr.io/SemRels/semrel:latest release --dry-run
jobs:
release:
runs-on: ubuntu-latest
container:
image: ghcr.io/SemRels/semrel:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore semrel plugins
run: semrel plugin restore
- name: Run semrel
run: semrel release
env:
SEMREL_PLUGIN_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Or use it as a Docker action step:

- name: Run semrel
uses: docker://ghcr.io/SemRels/semrel:latest-action
with:
args: release
env:
SEMREL_PLUGIN_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GitHub mounts the action workspace with the runner’s ownership and requires Docker container actions to run as root. Use the dedicated -action tag only with uses: docker://...; the regular images deliberately remain non-root.

semrel:
image: ghcr.io/SemRels/semrel:latest
stage: release
script:
- semrel plugin restore
- semrel release --gitlab-dotenv semrel.env
artifacts:
reports:
dotenv: semrel.env
jobs:
release:
runs-on: ubuntu-latest
container:
image: ghcr.io/SemRels/semrel:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore semrel plugins
run: semrel plugin restore
- name: Run semrel
run: semrel release
env:
SEMREL_PLUGIN_TOKEN: ${{ secrets.GITEA_TOKEN }}
VariableRequiredDescription
SEMREL_PLUGIN_TOKENYes (most providers)API token passed to provider/hook plugins
SEMREL_DRY_RUNNoSet to true to simulate without making changes
SEMREL_REGISTRY_URLNoOverride the plugin registry URL

semrel operates on the current working directory. When using docker run, mount your repository to /workspace:

Terminal window
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e SEMREL_PLUGIN_TOKEN="$GITHUB_TOKEN" \
ghcr.io/SemRels/semrel:latest release

Pin to a specific version for reproducible builds:

Terminal window
ghcr.io/SemRels/semrel:1.0.0 # distroless
ghcr.io/SemRels/semrel:1.0.0-alpine # Alpine
  • Both regular images run as a non-root user by default.
  • The opt-in -action image runs as root solely for GitHub Docker container actions. Do not use it for general container workloads.
  • The latest (distroless) image has no shell or package manager — minimal attack surface.
  • The Alpine image is pinned to 3.22 and built with apk upgrade --no-cache to apply all security patches at build time.
  • Images are signed with cosign and include an SBOM attestation.