<#765 Hash .dockerignore in image identifiers to a...
# flyte-github
a
#765 Hash .dockerignore in image identifiers to avoid stale caches Pull request opened by Copilot on <!date^1772945980^{date_short}|2026-03-08T04:59:40Z> Flyte image hashes ignored
.dockerignore
contents, so edits to ignore rules didn’t invalidate cached image identifiers. • Image hashing • Add helper to hash
.dockerignore
contents with logged warnings on read failures. • Include implicit project
.dockerignore
(from init config root) when no explicit DockerIgnore layer exists. • Keep MD5-based image hash but now sensitive to ignore-file contents; streamlined loop to detect DockerIgnore layers. • Typing & docs • Introduced a minimal hash protocol type and clarified helper docstrings about side-effect behavior. • Tests • Added regression tests ensuring image URIs change when explicit or implicit
.dockerignore
content changes. Example: img = Image.from_base("python:3.12-slim-bookworm").clone(registry="local", name="demo", extendable=True) uri1 = img.with_dockerignore(Path(".dockerignore")).uri Path(".dockerignore").write_text("new-rule\n") uri2 = img.with_dockerignore(Path(".dockerignore")).uri assert uri1 != uri2 # hash now tracks .dockerignore changes --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey. flyteorg/flyte-sdk