Add --image flag for derived container images#43
Conversation
DataLad-only derived image that adds datalad, datalad-next, and datalad-container on top of the base con-bomination-claude-code image. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Derived image that adds DataLad (with datalad-next and datalad-container) and Jujutsu (jj) version control on top of the base image. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --image=NAME flag for choosing a derived container image. A short suffix like "datalad-jj" maps to con-bomination-claude-code-datalad-jj; names containing / or : are used as-is for registry images. Also configurable via YOLO_IMAGE in .git/yolo/config (CLI takes precedence). When a requested image doesn't exist locally, yolo looks for a matching images/Dockerfile.<suffix> and offers to build it. Default behavior is unchanged: without --image, yolo uses the base con-bomination-claude-code image as before. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| # Install DataLad with useful extensions | ||
| RUN uv tool install --with datalad-container --with datalad-next datalad && \ | ||
| uv cache clean |
There was a problem hiding this comment.
although I like modularity I really dislike duplication. And this example shows that combinatorics kick in early if you start thinking about datalad+something else. That is why we have in ./setup-yolo.sh
--packages=PKGS Extra apt packages to install in the container image
(comma or space-separated, requires rebuild)
--extras=EXTRAS Predefined extras to include (comma-separated):
cuda - NVIDIA CUDA toolkit for building GPU extensions
(experimental)
playwright - Playwright with Chromium for browser automation
all - Enable all extras
It might be worth may be eventually if they keep coming to move out "extras" from the logic into something else, but I think for now it is better to add smth like --uv-tools-install and/or --extras datalad-next and jj which would add those predefined invocations you added. I do not think we should breed Dockerfile's here.
--image arg to specify the name for image to create/use could stay. Then we better though also allow for local to this repo .env of some kind which would define which image(s) you would like to build on the system. ATM I personally just rely on the CLI bash history to remember my invocation
./setup-yolo.sh --build=yes --packages="ffmpeg,imagemagick,yt-dlp,nodejs,podman,podman-compose,curl,tmux" --extras=playwright --install=yes
note that with uv I can then easily install datalad or what is needed (should be defined in project's pyproject.toml) thus isolating those requirements from the image overall.
Summary
--image=NAMEflag to select derived container imagesdataladanddatalad-jjimages/Dockerfile.<suffix>on first useDefault behavior is unchanged —
yolowithout--imageusescon-bomination-claude-codeas before.Derived images
A short suffix maps to
con-bomination-claude-code-<suffix>; full registry names (with/or:) are used as-is. Also configurable viaYOLO_IMAGEin
.git/yolo/config.Creating your own
images/Dockerfile.<suffix>deriving from the base image:Test plan
🤖 Generated with https://claude.com/claude-code
EOF