Skip to content

feat(github-action): build and publish container images#562

Open
knechtionscoding wants to merge 7 commits intouber:masterfrom
knechtionscoding:feat/publish-docker-images
Open

feat(github-action): build and publish container images#562
knechtionscoding wants to merge 7 commits intouber:masterfrom
knechtionscoding:feat/publish-docker-images

Conversation

@knechtionscoding
Copy link
Copy Markdown

@knechtionscoding knechtionscoding commented Feb 10, 2026

Resolves: #561 and publishes images to the ghcr registry for the repo.

This allows people to use the images without forking/cloning the repo

Updates the dockerfiles to build the binaries as part of the build process

Copilot AI review requested due to automatic review settings February 10, 2026 12:23
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 10, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to build and publish the project’s container images to GitHub Container Registry (GHCR), addressing the need for publicly available images for downstream deployments (e.g., Helm users).

Changes:

  • Introduces a publish-images workflow that builds/pushes multi-arch images (amd64/arm64) for multiple Kraken components.
  • Uses Docker metadata-action to generate tags for branch, tag, and short SHA refs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 10, 2026 12:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 10, 2026 13:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +59 to +60
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.component }}
tags: |
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image naming uses only ${{ github.repository_owner }} (e.g., ghcr.io/uber/kraken-agent). That can collide if the owner publishes similarly named images from other repos. Consider including the repository in the path (e.g., ${{ github.repository }}) to make the namespace unambiguous.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anton-Kalpakchiev Do you want repo to be included in here?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to 21
FROM golang:1.23.11 AS builder


ENV CGO_ENABLED=1 GO111MODULE=on

WORKDIR /src

RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential pkg-config sqlite3 libsqlite3-dev && \
rm -rf /var/lib/apt/lists/*

COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN mkdir -p /out && \
go build -buildvcs=false -o /out/kraken-agent ./agent

FROM debian:12
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CGO_ENABLED=1 plus installing libsqlite3-dev strongly suggests the built binary may be dynamically linked against libsqlite3.so.*. The runtime stage (debian:12) does not install the runtime SQLite library, so the container can fail at startup with missing shared library errors. Fix by either (a) installing the runtime package (typically libsqlite3-0) in the final stage, or (b) building a fully static binary (e.g., use CGO_ENABLED=0 if the project supports it).

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +18
RUN go mod download

COPY . .
RUN mkdir -p /out && \
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The builder stage doesn’t take advantage of BuildKit caching for Go modules/build cache, so CI builds will repeatedly download modules and recompile from scratch. Since you already set # syntax=docker/dockerfile:1.6, consider using BuildKit cache mounts for /go/pkg/mod and the Go build cache to significantly speed up repeated builds.

Suggested change
RUN go mod download
COPY . .
RUN mkdir -p /out && \
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
mkdir -p /out && \

Copilot uses AI. Check for mistakes.
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.

Publish Container Images

4 participants