Skip to content

Add the CLI Docker image and its build workflow - #209

Merged
kaze-cow merged 7 commits into
mainfrom
cli-image
Oct 19, 2026
Merged

kaze-cow merged 7 commits into
mainfrom
cli-image

Conversation

@kaze-cow

@kaze-cow kaze-cow commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Brings the cow CLI Docker image and its CLI image workflow into main. This is all @glokos's work: it builds ghcr.io/cowprotocol/cow-cli for amd64 and arm64, then merges both into one manifest tagged with the sha and branch/tag. The image includes the Solana CLI and bc that the buffer-reclaim script needs.

The first three commits are Assem's original commits from #190 and #205, cherry-picked unchanged. The last one drops the temporary cli-reclaim-buffer push trigger, which #190 said to remove once the image landed in main.

Motivation

#190 and #205 were merged into the reclaim stack's branches instead of main, so the image work now shows up inside #206/#207/#204 and makes them harder to review. Landing it here on its own means those PRs only show CLI changes once they're rebased.

Considerations

Credit

Please rebase-merge this PR rather than squash it, so that Assem's commits land on main with him as the author. The trigger commit lists him as co-author too.

Parity with the stack

.github/workflows/cli-image.yml and test-cli/Dockerfile on this branch are byte-for-byte identical to the versions on cli-reclaim-buffer (#204), so rebasing the stack onto main afterwards should drop these files from its diff.

How to test

This PR should be the same as those already included in the buffer reclaim changes we eventually expect to merge:

git diff origin/cli-reclaim-buffer -- .github/workflows/cli-image.yml test-cli/Dockerfile   # empty

Once merged, any branch that contains the workflow file can be built by hand, via Actions → CLI image → Run workflow (pick the branch under "Use workflow from") or:

gh workflow run cli-image.yml --ref <branch>

Unfortunately it doesn't seem to be possible to workflow dispatch until this is actually merged, but an example of this dockerfile generating a successful build though CI is already on its actions page.

The image is tagged cow-cli:<branch> (slashes become -) and cow-cli:sha-<short>.

🤖 Generated with Claude Code

glokos and others added 4 commits October 19, 2026 16:17
- build amd64 and arm64 natively, push by digest
- merge digests into one ghcr.io/cowprotocol/cow-cli manifest
- add slim debian runtime image with curl and jq
- build on cli-reclaim-buffer until it lands in main

Refs: DEV-481
- short-lived jobs don't need signal forwarding or zombie reaping
- use docker run --init for interactive runs

Refs: DEV-481
reclaim-buffers derives PDAs with the solana cli and prices dust with
bc. Adds both
to the cow-cli image (solana v4.0.3, amd64-only since agave has no arm64
linux build) so
  buffer reclaim runs in-cluster.
The cli-reclaim-buffer trigger was temporary until the image landed in main (see #190).

Co-authored-by: Assem Hasna <assem@cow.fi>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kaze-cow
kaze-cow requested a review from a team as a code owner October 19, 2026 07:18
@kaze-cow
kaze-cow requested a review from glokos October 19, 2026 07:18
@kaze-cow

Copy link
Copy Markdown
Contributor Author

update: preserving authorship is difficult and contrary to the pattern we have always followed in this repo up to this point, so we are going to squash merge to keep it simple.

@fedgiac fedgiac 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.

To be honest it's a bit confusing and I think it could be made simpler. But overall it doesn't matter much for our purposes as long as it works.

Comment thread .github/workflows/cli-image.yml Outdated
Comment thread .github/workflows/cli-image.yml Outdated
Comment thread test-cli/Dockerfile Outdated
kaze-cow and others added 3 commits October 19, 2026 17:17
Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com>
Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com>
@kaze-cow
kaze-cow merged commit 96cb19f into main Oct 19, 2026
18 checks passed
@kaze-cow
kaze-cow deleted the cli-image branch October 19, 2026 08:22
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.

3 participants