FROM gcc-x86_64:6.3.0 FROM hello-static:1.0 FROM centos7-make:3.82 COPY --from=0 /opt/x-tools /opt/x-tools COPY --from=1 /opt/hello /opt/hello LABEL maintainer="Kjell Enblom " # This is a wrapper container to use toolchaincontainerimage to build something. ENV PATH=/opt/x-tools/x86_64-centos7-linux-gnu/bin:$PATH ENV ARCH=x86_64 ENV CROSS_COMPILE=x86_64-centos7-linux-gnu- # /build should already be empty RUN rm -rf /build # Run the wrapperscript /build/build.sh to (cross compile) build something. ENTRYPOINT ["/build/build.sh"] # Example to run this: # docker run -it --rm -v ~/src/project:/build centos7-crosscompile-x86_64:1.0 # docker run -it --rm -v ~/src/project:/build centos7-crosscompile-x86_64:1.0 hello # docker run -it --rm -v ~/src/project:/build centos7-crosscompile-x86_64:1.0 clean