New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to loaded images don't invalidate cache for RUN commands in WITH DOCKER #2337
Comments
@JBergles I've reproduced this behavior; I'm assuming it's the same cause (so adding to your issue rather than creating a new one), but can you confirm whether you were using I believe this is specific to using the internal registry. What I used as the basis for my reproduction: VERSION 0.6
img1:
FROM alpine
RUN echo "41" > /num
CMD ["cat", "/num"]
test1:
FROM earthly/dind:alpine
WITH DOCKER --load img=+img1
RUN docker run --rm img && \
[ "$(docker run --rm img)" -eq 41 ]
END With version
With version
Using feature flags this behavior can be forced to flip-flop (strongly hinting that the registry functionality is responsible, not features/regressions in these specific versions). Specifically:
I can post raw logs, but thought it would be more effective/useful to point out the potential culprit. |
Yes, I'm on version 0.6.28 7e4f1df
|
I'm not sure if this is a bug or an issue with my understanding of how caching works in earthly, so please bear with me.
Earthfile
Steps:
earthly -P +example
for the included Earthfiletest.txt
earthly -P +example
againExpected results:
The
RUN docker run built-image:latest cat /test.txt
command is executed againObserved results:
RUN step is reported as cached. If
--no-cache
is used with the RUN step, I can see that the updated container image is being used.earthly-example.zip
The text was updated successfully, but these errors were encountered: