Skip to content
José Lorenzo Rodríguez edited this page Feb 4, 2018 · 1 revision

COPY --from cannot reference its own FROM alias

Problematic code:

FROM debian:jesse as build

COPY --from=build some stuff ./

Correct code:

FROM debian:jesse as build

RUN stuff

FROM debian:jesse

COPY --from=build some stuff ./

Rationale:

Trying to copy from the same image the instruction is running in results in an error.

Clone this wiki locally