Docker Community Forums

Share and learn in the Docker community.

Does multi stage build work on powershell system commands?


(Anavalcyrious) #1

example docker file

FROM as builder
COPY certificates .
RUN CertUtil certificate.cer
RUN buildsomething -output C:\output

FROM
COPY --from=builder C:\output
ENTRYPOINT startserver C:\output

in this example dockerfile
does the final image result also have its certificates installed?


(Raj Chaudhuri) #2

No, it doesn’t. Your second stage only copies the files in the C:\output directory of the output of the first stage.

You should install the certificates in the second stage as well.