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

COPY --from should reference a previously defined FROM alias

Problematic code:

FROM debian:jesse

RUN stuff

FROM debian:jesse

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 a missing image alias results in an error.

Clone this wiki locally