Intermediate Docker
Mike Metzger
Data Engineering Consultant
FROM commandFROM ubuntu
RUN apt update
RUN apt install gcc -y
...
RUN make
CMD ["data_app"]
AS <alias>COPY --from=<alias># Create initial build stage FROM ubuntu AS stage1# Install compiler and compile code RUN apt install gcc -y ... RUN make# Start new stage to create final image FROM alpine-base# Copy from first stage to final COPY --from=stage1 /data_app /data_app# Run application on container start CMD ["data_app"]
Intermediate Docker