depot-container-builds
What it does
This skill guides the AI agent through building container images with Depot instead of a local Docker setup. It is for developers who package apps as Docker images.
When to use it
- ✓When you need to build a Docker image on remote Depot builders.
- ✓When you want one image built for both Intel and ARM computers.
- ✓When a container build fails and you need help fixing it or speeding up its cache.
Skill link
https://github.com/PostHog/posthog/blob/master/.agents/skills/depot-container-builds/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Build a Docker image of my app with Depot for both Intel and ARM chips and push it to my registry.”
5 new skills a week. 1 minute to read.
How it works
The agent uses Depot's build commands in place of the usual Docker build commands. Builds run on remote machines with automatic caching, and the agent can load, push, or save the image.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Depot Container Builds
Depot runs Docker image builds on remote high-performance builders (16 CPU, 32 GB RAM, NVMe SSD cache). depot build is a drop-in replacement for docker build / docker buildx build. depot bake replaces docker buildx bake.
Before you propose a change to CI, check things already tried for the idea. It records what was measured, and why some good-sounding changes were reverted or rejected.
<!-- End PostHog-local section. -->Project Selection for Multi-Org Users
Container build commands target a specific project, not an organization. If expected projects aren't visible or a build unexpectedly prompts to select a project, the current default org may be wrong:
depot org show # Current org ID
depot org list # Orgs the user belongs to
depot org switch <org-id> # Optional: set default org
Key Concepts
- Builds run remotely on ephemeral EC2 instances — images stay in remote cache by default
- Use
--loadto download to local Docker,--pushto push to a registry,--saveto store in Depot's ephemeral registry - Cache is fully automatic on persistent NVMe SSDs — no manual cache config needed
- Multi-platform builds use native CPU builders (no QEMU emulation) for amd64 and arm64 simultaneously
- All team members on a project share the same layer cache
depot build — Essential Patterns
# Build remotely (image stays in remote cache)
depot build -t repo/image:tag .
# Build + download to local Docker daemon
depot build -t repo/image:tag . --load
# Build + push directly to registry (fast — doesn't route through local network)
depot build -t repo/image:tag . --push
# Multi-platform build (native CPUs, no emulation)
depot build --platform linux/amd64,linux/arm64 -t repo/image:tag . --push
# Save to Depot ephemeral registry (7-day default, configurable per repository)
depot build --save .
depot build --save --save-tag my-tag .
# Suppress provenance metadata (fixes "unknown/unknown" platform in registries)
depot build -t repo/image:tag --push --provenance=false .
# Lint Dockerfile before building
depot build -t repo/image:tag . --lint
# Build with secrets
depot build --secret id=mysecret,src=./secret.txt -t repo/image:tag .
# Build with SSH forwarding
depot build --ssh default -t repo/image:tag .
# Specify a Depot project explicitly
depot build --project <project-id> -t repo/image:tag .
Key Flags
| Flag | Description |
|---|---|
--load |
Download image to local Docker daemon |
--push |
Push to registry |
--save |
Save to Depot ephemeral registry |
--save-tag |
Custom tag for Depot Registry |
--platform |
Target platforms: linux/amd64, linux/arm64 (native, no emulation), plus linux/arm/v6, linux/arm/v7, linux/386 |
--build-platform |
Force build to run on specific arch (dynamic default) |
--project |
Depot project ID |
--token |
Depot API token |
--lint |
Lint Dockerfile before build |
--provenance |
Control provenance attestation (set false to fix unknown/unknown) |
--sbom |
Generate an SBOM attestation (shorthand for --attest type=sbom) |
--sbom-dir |
D |
FAQ
Is it a replacement for docker build?
Yes. The skill says depot build is a drop-in replacement for docker build, and depot bake replaces docker buildx bake.
Where do the images end up?
The skill can load the image to local Docker, push it to a registry, or save it to Depot's registry, depending on the option chosen.
Do I need to set up a cache?
No. The skill says caching is automatic on Depot's builders.
Details
Original description by the author
Configures and runs Depot remote container builds using `depot build` and `depot bake`. Use when building Docker images, creating Dockerfiles with Depot, pushing images to registries, building multi-platform/multi-arch images (linux/amd64, linux/arm64), debugging container build failures, optimizing Dockerfile layer caching, using docker-bake.hcl or docker-compose builds, or migrating from `docker build` / `docker buildx build` to Depot. Also use when the user mentions depot build, depot bake, container builds, image builds, or asks about Depot's build cache, build parallelism, build autoscali
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6811
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
formatting-slack-messages
41kHelps your agent build clear Slack messages, modals and home screens with the right layout, checked against Slack's current rules.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.