Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
openaec-foundation avatar

Docker Syntax Cli Images

  • 8 installs
  • 9 repo stars
  • Updated July 8, 2026
  • openaec-foundation/docker-claude-skill-package

Helps with devops & ci/cd tasks.

About

docker-syntax-cli-images is a Claude Code skill for devops & ci/cd. It helps solo builders move faster with AI-assisted development.

  • docker-syntax-cli-images
  • DevOps & CI/CD
  • AI-coding skill

Docker Syntax Cli Images by the numbers

  • 8 all-time installs (skills.sh)
  • Ranked #1,044 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/openaec-foundation/docker-claude-skill-package --skill docker-syntax-cli-images

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs8
repo stars9
Last updatedJuly 8, 2026
Repositoryopenaec-foundation/docker-claude-skill-package

What it does

Helps with devops & ci/cd tasks.

Files

SKILL.mdMarkdownGitHub ↗

docker-syntax-cli-images

Quick Reference

Image Lifecycle Commands

CommandPurposeExample
docker buildx buildBuild image from Dockerfile (default builder)docker buildx build -t myapp:v1 .
docker pullDownload image from registrydocker pull nginx:1.25
docker pushUpload image to registrydocker push myregistry.com/myapp:v1
docker tagCreate new tag for existing imagedocker tag myapp:v1 myregistry.com/myapp:v1
docker imagesList local imagesdocker images --filter dangling=true
docker rmiRemove image(s)docker rmi nginx:old
docker image pruneRemove unused imagesdocker image prune -a -f
docker saveExport image to tar archivedocker save -o backup.tar myapp:v1
docker loadImport image from tar archivedocker load -i backup.tar
docker historyShow image layer historydocker history --no-trunc myapp:v1
docker manifest inspectInspect multi-platform manifestdocker manifest inspect nginx:latest

System Management Commands

CommandPurposeExample
docker system dfShow disk usage breakdowndocker system df -v
docker system pruneRemove all unused resourcesdocker system prune -a --volumes -f
docker infoShow system-wide informationdocker info --format '{{.ServerVersion}}'
docker versionShow client/server versionsdocker version --format json
docker contextManage remote Docker hostsdocker context use remote

Critical Warnings

NEVER run docker system prune -a --volumes on production systems without first running docker system df -- it removes ALL unused volumes including database data.

NEVER use docker build (legacy) for new projects -- ALWAYS use docker buildx build which is the default BuildKit-based builder since Docker Engine 23+.

NEVER push images without verifying the tag -- docker push myapp pushes ALL tags of that repository. ALWAYS specify the exact tag: docker push myapp:v1.

ALWAYS use --platform when building for a different architecture -- omitting it silently builds for the host platform, causing exec format error at runtime on the target.

ALWAYS run docker system df before any cleanup operation to understand what is consuming disk space.

---

Buildx Build Flag Reference

Core Build Flags

FlagDescriptionExample
-f, --fileDockerfile path-f Dockerfile.prod
-t, --tagTag the image (repeatable)-t myapp:v1 -t myapp:latest
--targetBuild specific stage--target build-env
--build-argBuild-time variable--build-arg NODE_ENV=prod
--no-cacheDisable build cache entirely--no-cache
--pullAlways pull base images--pull
--progressOutput format: auto/plain/tty/quiet--progress=plain

Output Flags

FlagDescriptionExample
--loadLoad into local Docker images--load
--pushPush to registry after build--push
-o, --outputCustom output destination-o type=local,dest=./out

Output types: docker (local), registry (push), local (filesystem), tar, oci, image.

Multi-Platform Flags

FlagDescriptionExample
--platformTarget platform(s)--platform linux/amd64,linux/arm64
--builderUse specific builder instance--builder mybuilder

ALWAYS use --push or -o (not --load) when building for multiple platforms -- --load only supports single-platform images.

Cache Flags

FlagDescriptionExample
--cache-fromImport cache source--cache-from type=gha
--cache-toExport cache destination--cache-to type=gha,mode=max

Cache types: registry, local, inline, gha (GitHub Actions), s3, azblob.

Security & Secrets Flags

FlagDescriptionExample
--secretExpose secret to build (never baked in)--secret id=aws,src=$HOME/.aws/credentials
--sshExpose SSH agent/keys to build--ssh default=$SSH_AUTH_SOCK

Attestation Flags

FlagDescriptionExample
--provenanceSLSA provenance attestation--provenance=mode=max
--sbomSoftware Bill of Materials--sbom
--metadata-fileWrite build metadata as JSON--metadata-file meta.json

---

Buildx Builder Management

# Create a new builder instance
docker buildx create --name mybuilder --use

# List all builders
docker buildx ls

# Inspect current builder
docker buildx inspect

# Switch to a builder
docker buildx use mybuilder

# Remove a builder
docker buildx rm mybuilder

ALWAYS create a dedicated builder for multi-platform builds -- the default builder does not support multi-platform output.

---

Image Filter Cheat Sheet

docker images --filter

FilterDescriptionExample
dangling=trueUntagged images (no repo:tag)docker images -f dangling=true
label=keyImages with specific labeldocker images -f label=maintainer
label=key=valueImages with label matching valuedocker images -f label=app=web
before=imageCreated before given imagedocker images -f before=nginx:1.24
since=imageCreated after given imagedocker images -f since=nginx:1.24
reference=patternWildcard match on repo:tagdocker images -f reference="ngin*:lat*"

Image Format Placeholders

PlaceholderOutput
{{.ID}}Image ID
{{.Repository}}Repository name
{{.Tag}}Tag
{{.Digest}}Content digest
{{.CreatedSince}}Time since creation
{{.CreatedAt}}Creation timestamp
{{.Size}}Disk size
# Compact image list
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"

# JSON output (one per line)
docker images --format json

# Only IDs for scripting
docker images -q

# Remove all dangling images
docker rmi $(docker images -q -f dangling=true)

---

Disk Cleanup Strategy

ALWAYS follow this order -- from safest to most aggressive:

1. Assess -- docker system df -v 2. Containers -- docker container prune -f 3. Dangling images -- docker image prune -f 4. All unused images -- docker image prune -a -f 5. Build cache -- docker builder prune -f 6. Volumes -- docker volume ls -f dangling=true then docker volume prune -f 7. Nuclear -- docker system prune -a --volumes -f

What Each Prune Removes

CommandRemoves
docker container pruneAll stopped containers
docker image pruneDangling images only
docker image prune -aALL unused images
docker network pruneAll unused networks
docker volume pruneAll unused anonymous volumes
docker builder pruneBuild cache
docker system pruneContainers + networks + dangling images + build cache
docker system prune -a --volumesAll of the above + all unused images + volumes

Prune Filter Flags

FlagDescriptionExample
--filter "until=24h"Resources older than durationdocker image prune -f --filter "until=24h"
--filter "label=temp"Resources with labeldocker system prune --filter "label=temp"
--filter "label!=keep"Resources without labeldocker image prune --filter "label!=keep"
-fSkip confirmation promptdocker system prune -f

---

Decision Tree: Which Cleanup Command?

Need to free disk space?
├── Know what's using space? → docker system df -v
├── Just dangling/untagged images? → docker image prune -f
├── All unused images? → docker image prune -a -f
├── Stopped containers? → docker container prune -f
├── Build cache growing? → docker builder prune -f
├── Unused volumes? → docker volume prune -f (CHECK FIRST!)
└── Everything unused? → docker system prune -a --volumes -f (DANGEROUS on prod)
Need to transfer images offline?
├── Full image with layers + tags + history → docker save / docker load
├── Container filesystem snapshot (no metadata) → docker export / docker import
└── Multi-platform manifest → docker manifest create + push
Need multi-platform builds?
├── Single platform, local use → docker buildx build --platform linux/amd64 --load .
├── Multiple platforms, push to registry → docker buildx build --platform linux/amd64,linux/arm64 --push .
└── Need a builder first? → docker buildx create --name mp --use

---

System Information Commands

docker system df

docker system df              # Summary: images, containers, volumes, build cache
docker system df -v           # Verbose per-resource breakdown
docker system df --format "table {{.Type}}\t{{.TotalCount}}\t{{.Size}}\t{{.Reclaimable}}"

docker info

docker info                                    # Full system information
docker info --format '{{.ServerVersion}}'      # Server version only
docker info --format '{{.Driver}}'             # Storage driver
docker info --format '{{json .Plugins}}'       # Available plugins

docker version

docker version                                 # Client + server versions
docker version --format '{{.Server.Version}}'  # Server version only
docker version --format json                   # JSON output

docker context

docker context ls                                                    # List all contexts
docker context create remote --docker "host=ssh://user@remote-host"  # Create SSH context
docker context use remote                                            # Switch to context
docker context use default                                           # Switch back
docker context inspect remote                                        # Show details
docker context rm remote                                             # Remove context

---

Reference Links

  • references/commands.md -- Complete image and system command reference with all flags
  • references/examples.md -- Image management workflows and cleanup scripts
  • references/anti-patterns.md -- Common image management mistakes and how to avoid them

Official Sources

  • https://docs.docker.com/reference/cli/docker/image/
  • https://docs.docker.com/reference/cli/docker/buildx/build/
  • https://docs.docker.com/reference/cli/docker/image/ls/
  • https://docs.docker.com/reference/cli/docker/system/
  • https://docs.docker.com/reference/cli/docker/system/prune/
  • https://docs.docker.com/reference/cli/docker/system/df/

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.