Skip to content

ci: add Docker image publish workflow to GHCR - #12

Open
techieanant wants to merge 2 commits into
sidinsearch:mainfrom
techieanant:ci/docker-publish
Open

ci: add Docker image publish workflow to GHCR#12
techieanant wants to merge 2 commits into
sidinsearch:mainfrom
techieanant:ci/docker-publish

Conversation

@techieanant

Copy link
Copy Markdown

What

Adds a GitHub Actions workflow that builds the server Docker image and pushes it to GitHub Container Registry (ghcr.io) automatically.

Why

The repo has a backend/Dockerfile but no CI to build/publish it. Users currently have to build locally. This makes docker pull ghcr.io/sidinsearch/superbrain work out of the box.

How

  • New workflow .github/workflows/docker-publish.yml triggers on:
    • Every push to main — tags: main, <sha>, latest
    • Every GitHub release — adds semver tags (e.g. 2.1.0, 2.1)
    • Manual dispatch
  • Uses Docker Buildx with GHA layer cache for fast rebuilds
  • Publishes to ghcr.io/<owner>/superbrain
  • Dockerfile fix: libgl1-mesa-glxlibgl1 (package was removed in Debian bookworm, which python:3.11-slim now uses)

Testing

Verified on fork — image builds and pushes successfully to ghcr.io.

Adds docker-publish.yml that builds backend/Dockerfile and pushes to
ghcr.io on every push to main, on releases (with semver tags), and
via manual dispatch.

Also fixes libgl1-mesa-glx -> libgl1 for Debian bookworm compatibility.
pip install --user installs to /root/.local which is inaccessible when
the container runs as appuser. Use --prefix=/install and copy to
/usr/local instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant