From 2b0211a45f510c81e8a9b2d47ff8c39f4c313cec Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 1 Mar 2018 11:45:40 +0100 Subject: [PATCH] Move build steps for better caching strategy --- Dockerfile | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65c6851b31..3e6adc0f4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,13 @@ FROM ultimaker/cura-build-environment:1 # Environment vars for easy configuration -ENV CURA_BENV_BUILD_TYPE=Release -ENV CURA_BRANCH=docker -ENV URANIUM_BRANCH=master -ENV CURA_ENGINE_BRANCH=master -ENV MATERIALS_BRANCH=master ENV CURA_APP_DIR=/srv/cura # Ensure our sources dir exists RUN mkdir $CURA_APP_DIR -# Setup Uranium -WORKDIR $CURA_APP_DIR -RUN git clone -b $URANIUM_BRANCH --depth 1 https://github.com/Ultimaker/Uranium -WORKDIR $CURA_APP_DIR/Uranium - -# Setup Cura -WORKDIR $CURA_APP_DIR -RUN git clone -b $CURA_BRANCH --depth 1 https://github.com/Ultimaker/Cura -WORKDIR $CURA_APP_DIR/Cura - -# Setup materials -WORKDIR $CURA_APP_DIR/Cura/resources -RUN git clone -b $MATERIALS_BRANCH --depth 1 https://github.com/Ultimaker/fdm_materials materials -WORKDIR $CURA_APP_DIR/Cura/resources/materials - # Setup CuraEngine +ENV CURA_ENGINE_BRANCH=master WORKDIR $CURA_APP_DIR RUN git clone -b $CURA_ENGINE_BRANCH --depth 1 https://github.com/Ultimaker/CuraEngine WORKDIR $CURA_APP_DIR/CuraEngine @@ -38,6 +19,24 @@ RUN make install # TODO: setup libCharon +# Setup Uranium +ENV URANIUM_BRANCH=master +WORKDIR $CURA_APP_DIR +RUN git clone -b $URANIUM_BRANCH --depth 1 https://github.com/Ultimaker/Uranium +WORKDIR $CURA_APP_DIR/Uranium + +# Setup materials +ENV MATERIALS_BRANCH=master +WORKDIR $CURA_APP_DIR/Cura/resources +RUN git clone -b $MATERIALS_BRANCH --depth 1 https://github.com/Ultimaker/fdm_materials materials +WORKDIR $CURA_APP_DIR/Cura/resources/materials + +# Setup Cura +ENV CURA_BRANCH=docker +WORKDIR $CURA_APP_DIR +RUN git clone -b $CURA_BRANCH --depth 1 https://github.com/Ultimaker/Cura +WORKDIR $CURA_APP_DIR/Cura + # Make sure Cura can find CuraEngine RUN ln -s /usr/local/bin/CuraEngine $CURA_APP_DIR/Cura