Docker Is Weird – What That Means for AI‑Heavy DevOps Workflows
Описание и применение
Новый механизм игнорирования Docker приводит к более точному управлению контекстом сборки, снижая размер образов и повышая безопасность AI‑приложений.
Задача
Docker’s new ignore logic now drops files matching both .dockerignore and .gitignore, exposing hidden dependencies and risking accidental inclusion of large source files in AI workloads.
Результат
Implementing explicit .dockerignore and CI checks reduced image size, cut pull times by ~30 % on GKE, and prevented accidental credential leaks.
Рабочий процесс
- Audit ignore files with a build context test to list files sent to the daemon
- Create a dedicated .dockerignore listing everything that should never be in an image
- Keep .gitignore for source‑control only and rely on Docker to drop duplicates
- Verify image size locally using BuildKit and inspect layer history
- Automate the context audit in CI to fail builds that ship unintended files
Доказательства
Docker now ignores files that match both .dockerignore and .gitignore when you run docker build
Many teams rely on a single .gitignore and assume Docker will respect it – that’s no longer safe
The payoff is immediate: our model‑serving pods now pull 30 % faster on GKE
- Дата записи: 2026-10-23T10:26:04.937Z