Unexpected Dockerfile caching behaviour #13636
Labels
component: image-builder
feature: workspace image build
meta: stale
This issue/PR is stale and will be closed soon
team: workspace
Issue belongs to the Workspace team
type: bug
Something isn't working
type: improvement
Improves an existing feature or existing code
Bug description
I think this is a known issue (within Gitpod at least), but it was a surprise to me that with a line in a
.gitpod.Dockerfile
like:...changes to
the_file
don't actually trigger a rebuild of the image. We internally came up with the same workaround of using a dummy ENV var to break the cache manually and force a rebuild when any dependent files change.It would be good to at least document this limitation, so devs don't have to independently discover it, usually following a period of frustration at why changes aren't being reflected in the workspace. 😞
Steps to reproduce
.gitpod.Dockerfile
:Open a workspace in a repo with the above Dockerfile configured, then make a change to
something
, push and open a new workspace again. If a previously cached image exists, the image won't be rebuilt.Workspace affected
No response
Expected behavior
In Docker/buildkit normally a change to a
COPY
ied file will trigger a rebuild of that layer and following layers.Example repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: