feat(no-ticket): adding container image build to CI - #369
Conversation
6a6415e to
976fb2a
Compare
654de0a to
377cc60
Compare
There was a problem hiding this comment.
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
Dockerfileto build a PyInstaller onedir distribution in a build stage and copy it into a runtime Alpine image. - Added a minimal
compose.yamland a GitHub Actions workflow to rundocker compose buildon pushes/PRs. - Generalized
.editorconfigYAML 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.
6374e22 to
9f841b9
Compare
| ADD uv.lock uv.lock | ||
| ADD VERSION VERSION | ||
|
|
||
| RUN set -eu; \ |
There was a problem hiding this comment.
do we still maintain the multi-architecture images by changing this?
There was a problem hiding this comment.
I can add a matrix to build it for amd64 and aarch64 if needed.
There was a problem hiding this comment.
more the merrier 😛 our release workflow pushes the docker image to cloudsmith and dockerhub
| ARG CLOUDSMITH_CLI_VERSION | ||
| ARG PYTHON_VERSION=3.14 | ||
|
|
||
| RUN uv sync --locked --no-dev --no-editable --group binary --extra all --python "${PYTHON_VERSION}" |
There was a problem hiding this comment.
previously we had no python or uv dependency due to just dropping in the standalone binary that takes care of all those concerns.
There was a problem hiding this comment.
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.)
No description provided.