← ClaudeAtlas

container-layerlisted

Build and cache a personalized container environment from a Dockerfile-like spec. Supports both single-layer (one Containerfile -> one cached tarball) and multi-layer composition (compose [base, scientific, mojo, ...] into one container with each layer cached independently). Use when the user mentions "container layer", "Containerfile", "custom container", "environment setup", "cache my installs", "uv shim", "composable layers", or wants to persist package installations, skills, or environment config across ephemeral sessions. Also triggers when the user asks to snapshot, restore, or rebuild their environment, or wants to capture ad-hoc package installs into a reproducible spec.
oaustegard/claude-skills · ★ 124 · DevOps & Infrastructure · score 84
Install: claude install-skill oaustegard/claude-skills
# Container Layer Build a reproducible, cached environment overlay for ephemeral containers using a Dockerfile-like spec. ## Concept The container resets every session, but your environment shouldn't. This skill: 1. Parses a `Containerfile` (Dockerfile subset) that declares your environment 2. Caches the built result as a tarball in GitHub Releases 3. Restores from cache on subsequent boots (single fetch vs. N installs) 4. Provides a `uv` shim that captures ad-hoc installs back into the Containerfile ## Supported Containerfile Instructions ```dockerfile # Environment variables ENV KEY=value # Shell commands (including package installs) RUN apt-get install -y foo # system packages RUN uv pip install pandas numpy # Python packages (preferred) RUN pip install requests # also works # Fetch files from URLs or GitHub FETCH https://example.com/file.tar.gz /dest/path FETCH github:user/repo /dest/path # latest tarball FETCH github:user/repo@ref /dest/path # specific ref # Set working directory for subsequent RUN commands WORKDIR /some/path # Declare paths to include in the cached layer snapshot # (auto-detected for FETCH destinations and pip/uv installs) SNAPSHOT /additional/path/to/capture # Ignored (Dockerfile compat, no-op here): # FROM, EXPOSE, CMD, ENTRYPOINT, LABEL, ARG, VOLUME, USER, SHELL ``` ## Usage ### Single layer — build / restore ```python from scripts.containerfile import ContainerLayer layer = ContainerLayer( co