Skip to content

fix: bust Docker cache when OPENCLAW_GIT_REF changes#183

Open
kavinbmittal wants to merge 1 commit into
vignesh07:mainfrom
kavinbmittal:fix/docker-cache-bust
Open

fix: bust Docker cache when OPENCLAW_GIT_REF changes#183
kavinbmittal wants to merge 1 commit into
vignesh07:mainfrom
kavinbmittal:fix/docker-cache-bust

Conversation

@kavinbmittal

Copy link
Copy Markdown

Summary

  • Docker caches RUN layers by instruction text. Changing ARG OPENCLAW_GIT_REF default alone doesn't invalidate the cache because the RUN git clone ... instruction string stays identical.
  • This causes Railway deploys to silently reuse the old cached clone even after bumping the version.
  • Fix: inline the ARG into the RUN via echo so the resolved instruction changes when the ref changes.

Test plan

  • Update OPENCLAW_GIT_REF to a new tag and deploy — verify the build clones the correct version

🤖 Generated with Claude Code

Docker caches RUN layers by instruction text. Since ARG default changes
don't alter the RUN text, updating OPENCLAW_GIT_REF silently reuses the
cached clone of the old version.

Inline the ARG into the RUN via echo so that changing the ref value
produces a different instruction string and forces a fresh clone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants