I have an example docker build - a Dockerfile that looks like the following:
FROM debian:buster-slim as other
FROM alpine:latest
COPY --from=other / /
This builds successfully prior to the 2.4.0.0 version of docker desktop for windows. Attempting to build with any version 2.4.0.0 and newer results in the following style of copy error:
=> ERROR [stage-1 2/2] COPY --from=other / / 1.0s
------
> [stage-1 2/2] COPY --from=other / /:
------
failed to solve with frontend dockerfile.v0: failed to build LLB: cannot replace to directory /var/lib/docker/overlay2/hc1w3xu51id4vm10bbsijznxa/merged/var/lock with file
Does anyone know of a work-around for this style of whole image copy over an existing image to work in docker desktop for Windows versions 2.4.0.0+?
Note also the above is just a useless example to illustrate the issue with small images - I have a real scenario where I am copying an entire distroless image right over the top of the equivalent distroād image in order to restore package managers where this whole image copy is useful.
Any help is much appreciated.