Skip to content

feat(no-ticket): adding container image build to CI - #369

Open
coillteoir wants to merge 1 commit into
masterfrom
pr369
Open

feat(no-ticket): adding container image build to CI#369
coillteoir wants to merge 1 commit into
masterfrom
pr369

Conversation

@coillteoir

@coillteoir coillteoir commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coillteoir
coillteoir force-pushed the pr369 branch 2 times, most recently from 6a6415e to 976fb2a Compare August 20, 2026 13:33
@coillteoir
coillteoir marked this pull request as ready for review August 20, 2026 13:33
Copilot AI lite review requested due to automatic review settings August 20, 2026 13:33
@coillteoir
coillteoir requested a review from a team as a code owner August 20, 2026 13:33
@coillteoir
coillteoir force-pushed the pr369 branch 2 times, most recently from 654de0a to 377cc60 Compare August 20, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 CI workflow to build the Cloudsmith CLI container image from source, shifting the Dockerfile from “unpack prebuilt binaries” to a uv + PyInstaller build pipeline.

Changes:

  • Reworked Dockerfile to build a PyInstaller onedir distribution in a build stage and copy it into a runtime Alpine image.
  • Added a minimal compose.yaml and a GitHub Actions workflow to run docker compose build on pushes/PRs.
  • Generalized .editorconfig YAML indentation rules to cover all YAML file extensions.

Reviewed changes

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

File Description
Dockerfile Switches to building the CLI inside the container image using uv sync + pyinstaller and copies the built dist into the final image.
compose.yaml Defines a cli service to build/tag the image via Docker Compose.
.github/workflows/image-build.yml Adds CI job to build the container image on master and PRs.
.editorconfig Updates YAML indentation section (but needs correct EditorConfig glob syntax).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Dockerfile Outdated
Comment thread .editorconfig Outdated
Comment thread Dockerfile Outdated
Comment thread .github/workflows/image-build.yml Outdated
@coillteoir
coillteoir force-pushed the pr369 branch 2 times, most recently from 6374e22 to 9f841b9 Compare August 20, 2026 13:44
Comment thread Dockerfile Outdated
Comment thread Dockerfile
ADD uv.lock uv.lock
ADD VERSION VERSION

RUN set -eu; \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we still maintain the multi-architecture images by changing this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can add a matrix to build it for amd64 and aarch64 if needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

more the merrier 😛 our release workflow pushes the docker image to cloudsmith and dockerhub

Comment thread Dockerfile
ARG CLOUDSMITH_CLI_VERSION
ARG PYTHON_VERSION=3.14

RUN uv sync --locked --no-dev --no-editable --group binary --extra all --python "${PYTHON_VERSION}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

previously we had no python or uv dependency due to just dropping in the standalone binary that takes care of all those concerns.

@coillteoir coillteoir Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The final image in this build only contains the standalone binary.

It is ideal to build container images from source, since it means builds are more declarative (docker isn't a declarative build format since it calls out to the internet, but its better than copying from local directories.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants