Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 6 min read How-to mediumAdept

Docker Best Practices: Using Tags and Labels to Manage Docker Image Sprawl

Docker's `latest` tag does not mean the newest version: it is simply applied to the most recent build or push made without an explicit tag, and mutable tags like `v1.0.0` can be silently overwritten or mis-applied. A worked example shows `latest` pointing to 1.0.0 after 1.0.1 ships, and a `1.0.1` tag actually running 1.0.2 code. The recommended fix is embedding version metadata with the `LABEL` instruction, which can be checked via `docker inspect` without running the container. It also suggests using the OCI `org.opencontainers.image.*` label set and namespaced custom labels for team-specific metadata.

Assumes: Dockerfile basicscontainer registries

Related posts

  • Trivy supply chain compromise: What Docker Hub users should know

    Docker mediumAdept

    Attackers used stolen Aqua Security publishing credentials to push infostealer-laden aquasec/trivy images (0.69.4, 0.69.5, 0.69.6 and latest) to Docker Hub between March 19 and March 23, 2026. The malware targets Docker registry tokens, cloud credentials, SSH keys, Kubernetes tokens, CI/CD secrets and .env files. Anyone who pulled those tags or digests should remove them, rotate all reachable credentials at once, treat hosts with the Docker socket mounted as fully compromised, and pin to 0.69.3. Takeaways: mutable tags are not a security boundary, digest pinning should be paired with signed provenance verification, and scanning cannot detect a compromised publishing pipeline.

  • Making the Most of Your Docker Hardened Images Enterprise Trial – Part 3

    Docker mediumAdept

    Docker Hardened Images (DHI) ship without package managers, shells or utilities, so adding agents, CA certificates or libraries needs one of two patterns. Platform teams can build "golden images" through the Docker Hub UI, which adds OS packages or OCI artifacts and automatically rebuilds and re-signs the image when the base DHI is patched. Developers can use a multi-stage Dockerfile: install dependencies (here the Datadog dd-trace library) in a Debian builder stage, then copy only the artifacts into the DHI runtime, setting NODE_PATH and using exec-form CMD. Scanning the result with Docker Scout found a high-severity CVE in a transitive lodash.pick dependency, a reminder that hardened bases do not protect added code, and locally built images should be signed with Cosign in CI because the original DHI signature no longer applies.

  • Introducing Docker Build Checks: Optimize Dockerfiles with Best Practices

    Docker mediumAdept

    Docker Desktop 4.33 adds Build checks, which evaluate Dockerfiles against codified best-practice rules during `docker build` and report warnings. Because the checks are part of the build itself, they also consider build arguments and base images rather than only linting the text. `docker build --check` runs the evaluation in under a second without executing the build, and `# check=error=true` makes warnings fail CI. Individual rules can be disabled with `# check=skip=...`, and the checks also work with multi-stage builds, Bake and Docker Build Cloud.

  • Hardened Images Are Free. Now What?

    Docker mediumAdept

    Docker Hardened Images (DHI), now free across 1,000+ images, establish a security "waterline": Docker owns vulnerability remediation for the base layers it hardens, while teams own application code and dependencies above it. Beyond CVE reduction, DHI isolates teams from supply chain attacks that exploit community image trust, such as stolen PATs and tag mutability. The recommended practice treats the container image as the unit of assessment, enforces simple severity-based policies (high/critical remediated, CISA KEV always in scope), and uses OpenVEX statements via vexctl and docker scout attestation add to document and auto-suppress assessed findings. These artifacts also support compliance evidence for ISO 27001, SOC 2 and the EU Cyber Resilience Act.

  • Securing the Docker MCP Catalog: Commit Pinning, Agentic Auditing, and Publisher Trust Levels

    Docker mediumAdept

    Docker's MCP Registry now pins every Docker-built MCP server to a specific Git commit, enforced in CI and propagated to the org.opencontainers.image.revision label, so builds are deterministic and verifiable with docker inspect or cosign. A nightly workflow bumps pins via per-server PRs, and each incoming change gets an agentic security review by Claude Code and OpenAI Codex. The reviewers are treated as untrusted: they run in a Docker Compose stack with read-only code mounts, no Internet access, a fixed-file output directory, and a reverse proxy that injects API keys so secrets never enter the container. Risk labels map to GitHub status checks (critical blocks merge), and the catalog adds publisher trust indicators distinguishing known publishers from community servers.

The quest for software engineering knowledge.

Look:
Layout: