You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when attempting to DoCacheProbe fails when encountering ENV directives:
#2: Using caching version of cmd: RUN cargo install exa bat ripgrep typos-cli watchexec-cli
#2: ENV CARGO_INSTALL_ROOT=/tmp/
error: get cached image: error probing build cache: uncached command *commands.EnvCommand encountered when probing cache
It looks like we need to implement the CachedExecuteCommand interface for both ENV and ARG commands:
As I was working on implementing tests for coder/kaniko#17 to fix this issue, I noticed we have another issue with multi-stage builds. COPY directives in multi-stage builds (COPY --from=first /a /b) rely on extraction to get the file hash. It makes sense but throws a few wrenches in our approach. Tracking the file hash across stages seems like a non-trivial thing to do. Without extraction, I think we'd still need to read the tar of the first stage to figure out the hash of the file to be copied.
Currently, when attempting to
DoCacheProbe
fails when encounteringENV
directives:It looks like we need to implement the
CachedExecuteCommand
interface for bothENV
andARG
commands:To reproduce, here is a sample Dockerfile that fails to cache probe:
Alternatively, try to build the dogfood Dockerfile from coder/coder with
ENVBUILDER_GET_CACHED_IMAGE=1
(assuming the image was previously built).The text was updated successfully, but these errors were encountered: