docker

December 17, 2025 ยท View on GitHub

Utility commands for working with Docker images.

Subcommands

CommandDescription
make-dockerfileGenerate a Dockerfile
build-baseBuild base image for environment
build-submissionBuild image for a submission
build-agentBuild image for an agent

make-dockerfile

Generate a Dockerfile for a docker environment.

Usage

slop-code docker make-dockerfile {base|agent} ENV_CONFIG_PATH

Arguments

ArgumentRequiredDescription
dockerfileYesType: base or agent
ENV_CONFIG_PATHYesPath to environment configuration file

Example

slop-code docker make-dockerfile base configs/environments/docker-python3.12-uv.yaml

build-base

Build the base image for a docker environment.

Usage

slop-code docker build-base [OPTIONS] ENV_CONFIG_PATH

Arguments

ArgumentRequiredDescription
ENV_CONFIG_PATHYesPath to environment configuration file

Options

OptionTypeDefaultDescription
--force-buildflagfalseForce rebuild even if image exists

Behavior

  1. Reads environment specification
  2. Generates Dockerfile for base image
  3. Builds image with Docker client
  4. Tags with environment name

Examples

# Build base image
slop-code docker build-base configs/environments/docker-python3.12-uv.yaml

# Force rebuild
slop-code docker build-base configs/environments/docker-python3.12-uv.yaml --force-build

build-submission

Build a docker image for a submission.

Usage

slop-code docker build-submission [OPTIONS] NAME SUBMISSION_PATH ENV_CONFIG_PATH PROBLEM_NAME

Arguments

ArgumentRequiredDescription
NAMEYesName for the built image
SUBMISSION_PATHYesPath to submission directory
ENV_CONFIG_PATHYesPath to environment configuration
PROBLEM_NAMEYesName of the problem

Options

OptionTypeDefaultDescription
--force-buildflagfalseForce rebuild
--build-baseflagfalseAlso rebuild base image

Behavior

  1. Loads environment and problem configurations
  2. Resolves static assets for the problem
  3. Builds submission image with code and assets mounted
  4. Tags with provided name

Examples

# Build submission image
slop-code docker build-submission my_submission \
  outputs/my_run/file_backup/checkpoint_1/snapshot \
  configs/environments/docker-python3.12-uv.yaml \
  file_backup

# With base rebuild
slop-code docker build-submission my_submission \
  outputs/snapshot \
  configs/environments/docker-python3.12-uv.yaml \
  file_backup \
  --build-base

build-agent

Build a docker image for an agent.

Usage

slop-code docker build-agent [OPTIONS] AGENT_CONFIG_PATH ENV_CONFIG_PATH

Arguments

ArgumentRequiredDescription
AGENT_CONFIG_PATHYesPath to agent configuration file
ENV_CONFIG_PATHYesPath to environment configuration file

Options

OptionTypeDefaultDescription
--force-buildflagfalseForce rebuild agent image
--force-build-baseflagfalseForce rebuild base image too

Behavior

  1. Loads agent and environment configurations
  2. Uses agent's docker template if present
  3. Builds image with agent-specific setup
  4. Used automatically by run command when needed

Examples

# Build agent image
slop-code docker build-agent \
  configs/agents/claude_code-2.0.51.yaml \
  configs/environments/docker-python3.12-uv.yaml

# Force rebuild everything
slop-code docker build-agent \
  configs/agents/claude_code-2.0.51.yaml \
  configs/environments/docker-python3.12-uv.yaml \
  --force-build --force-build-base

See Also