Docker
Run Custy with Docker
Build Custy locally and run its self-contained CLI against a deliberately mounted project workspace.
docker build --target production -t custy-prod:latest .Category
Quick Command
docker [build|run|compose] [OPTIONS]Overviewâ
Custy's multi-stage Dockerfile provides development and production image
targets. Both include Python 3.14, pip, Git, Make, and the Micro, Nano, Vim, and
Vi terminal editors. The production target
installs the runtime package, while the development target installs Custy in
editable mode with its development dependencies.
This path removes the need for a host Python or Git installation. Docker must still receive the intended project directory, repository metadata, identity, and credentials required by the selected Custy operation.
Requirements
Requirements
Docker Engine
Custy Source Checkout
Project Workspace
Docker Compose Plugin
Make
Project Backup
What the Image Contains
Docker Build Targets
Shared Base
Production
Development
Project Mount
Build the Production Image
From the Custy source root, the Make helper is the recommended local build. It
derives a normalized package version from Git before .git is excluded from
the Docker context, so custy --version inside the image matches the source
checkpoint.make c-build-prod
docker run --rm custy-prod:latest --version
docker run --rm custy-prod:latest --help
For a direct build, pass the intended PEP 440 package version explicitly. The
build argument controls Custy's installed package metadata and banner; it does
not change the version of a mounted target project.docker build --build-arg CUSTY_BUILD_VERSION=2.1.2 --target production -t custy-prod:latest .
Use --target development -t custy-dev:latest when testing or developing Custy
itself.
Pull a Published Production Image
Stable releases publish four coordinated GHCR tags. All version aliases retain
Custy's conventional v prefix.
| Tag form | Example | Behavior |
|---|---|---|
| Exact release | v2.1.2 | Immutable release selection and the recommended choice for CI or reproducible use. |
| Minor alias | v2.1 | Moves to the newest stable patch in the 2.1 line. |
| Major alias | v2 | Moves to the newest stable release in the 2 line. |
| Latest alias | latest | Moves to the newest stable Custy release. |
docker pull ghcr.io/devalltect00/custy:v2.1.2
docker pull ghcr.io/devalltect00/custy:v2.1
docker pull ghcr.io/devalltect00/custy:v2
docker pull ghcr.io/devalltect00/custy:latestRun Custy on a Project
Run the following commands from the root of the project that Custy should
manage. Because the image uses custy as its entrypoint, arguments after the
image name are Custy arguments.
Running the image without a command is also valid: Custy displays its root
help and exits successfully.docker run --rm -it -v "${PWD}:/workspace" custy-prod:latest --help
docker run --rm -it -v "${PWD}:/workspace" custy-prod:latest init
docker run --rm -it -v "${PWD}:/workspace" custy-prod:latest validatedocker run --rm -it -v "$(pwd):/workspace" custy-prod:latest --help
docker run --rm -it -v "$(pwd):/workspace" custy-prod:latest init
docker run --rm -it -v "$(pwd):/workspace" custy-prod:latest validatedocker run --rm -it -v "${PWD}:/workspace" -w /workspace custy-prod:latest run release
Git Identity and Remote Access
Mounting the project makes its local .git directory available, but it does
not automatically copy the host user's global Git configuration, SSH keys, or
credential-manager session into the container.
- Configure
user.nameanduser.emailin the repository or provide an intentionally reviewed Git configuration before commit or tag flows. - Provide SSH keys, tokens, or another supported Git credential mechanism only when a push is required.
- Keep normal Git and SSH authentication first. For supported GitHub or GitLab
HTTPS remotes, Custy can optionally read a token from a protected file mounted
at
/run/secrets/custyor from a named environment variable. - Review every credential and configuration mount carefully; never bake secrets into the image.
- Local-only commands such as initialization do not require remote credentials.
docker run --rm -it -v "${PWD}:/workspace" -v "$env:LOCALAPPDATA/Custy/credentials:/run/secrets/custy:ro" -w /workspace custy-prod:latest pushUse Docker Compose
The Compose files are primarily development helpers for the Custy source
checkout itself. Their base service mounts the current checkout at /workspace.
Use direct docker run -v commands when operating on a separate project root.docker compose -f docker-compose.yml -f docker-compose.prod.yml build app
docker compose -f docker-compose.yml -f docker-compose.prod.yml run --rm app --help
docker compose -f docker-compose.yml -f docker-compose.prod.yml run --rm app init
Use the development stack for Custy testing and contributor tools.docker compose -f docker-compose.yml -f docker-compose.dev.yml build app
docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm app --help
docker compose -f docker-compose.yml -f docker-compose.dev.yml run --rm test
Optional Makefile Helpers
From the Custy source checkout, GNU Make can wrap the local Docker and Compose
commands.# Build Dockerfile targets directly
make d-build-prod
make d-init
# Use the Docker Compose services
make c-build-prod
# Create and inspect external credentials
make d-credentials-set-github
make d-credentials-status
make d-credentials-test CUSTY_CREDENTIALS_REMOTE=origin
# Opt in to a read-only credential mount for push
make d-run-push CUSTY_CREDENTIALS_MOUNT=true
CUSTY_CREDENTIALS_MOUNT defaults to false, preserving native Git, SSH, and
manual interactive authentication. Setting it to true adds the external
credential directory to runtime targets as a read-only volume. Credential
set helpers always use a writable mount, while status and test helpers
always use read-only access. The same interface is available through
c-credentials-* / c-run-push for Compose and
r-custy-credentials-* / r-custy-run-push for a published image.
Override CUSTY_CREDENTIALS_HOST_DIR when the files do not live in the
platform default directory. The Make interface accepts a directory path, never
a token value. See Credential Examples
for the complete behavior matrix and platform defaults.