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:
To reproduce, here is a sample Dockerfile that fails to cache probe:
FROM alpine:latest
ENV FOO=hello
ARG BAR=world
RUN echo "$FOO $BAR" > /root/msg.txt
Alternatively, try to build the dogfood Dockerfile from coder/coder with ENVBUILDER_GET_CACHED_IMAGE=1 (assuming the image was previously built).
Currently, when attempting to
DoCacheProbefails when encounteringENVdirectives:It looks like we need to implement the
CachedExecuteCommandinterface for bothENVandARGcommands: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).