Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChrisTerBeke <c.terbeke@ultimaker.com>2018-03-01 12:58:18 +0300
committerChrisTerBeke <c.terbeke@ultimaker.com>2018-03-01 12:58:18 +0300
commit8b1bca6743581d9d31300bd36ff6e0b87d586e8a (patch)
treed79ea72aecf09576b1c837294507ed4c72e47c04 /Dockerfile
parent1c2999551b036755e66d889c620e3a5a3d2ead86 (diff)
Add run in docker script
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 12 insertions, 14 deletions
diff --git a/Dockerfile b/Dockerfile
index 30aacfdb56..464aebff53 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,32 +13,23 @@ RUN mkdir $CURA_APP_DIR
# Setup Uranium
WORKDIR $CURA_APP_DIR
-RUN git clone https://github.com/Ultimaker/Uranium
+RUN git clone -b $URANIUM_BRANCH --depth 1 https://github.com/Ultimaker/Uranium
WORKDIR $CURA_APP_DIR/Uranium
-RUN git fetch origin
-RUN git checkout $URANIUM_BRANCH
-RUN export PYTHONPATH=${PYTHONPATH}:$CURA_APP_DIR/Uranium
# Setup Cura
WORKDIR $CURA_APP_DIR
-RUN git clone https://github.com/Ultimaker/Cura
+RUN git clone -b $CURA_BRANCH --depth 1 https://github.com/Ultimaker/Cura
WORKDIR $CURA_APP_DIR/Cura
-RUN git fetch origin
-RUN git checkout origin $CURA_BRANCH
# Setup materials
WORKDIR $CURA_APP_DIR/Cura/resources
-RUN git clone https://github.com/Ultimaker/fdm_materials materials
+RUN git clone -b $MATERIALS_BRANCH --depth 1 https://github.com/Ultimaker/fdm_materials materials
WORKDIR $CURA_APP_DIR/Cura/resources/materials
-RUN git fetch origin
-RUN git checkout origin $MATERIALS_BRANCH
# Setup CuraEngine
WORKDIR $CURA_APP_DIR
-RUN git clone https://github.com/Ultimaker/CuraEngine
+RUN git clone -b $CURA_ENGINE_BRANCH --depth 1 https://github.com/Ultimaker/CuraEngine
WORKDIR $CURA_APP_DIR/CuraEngine
-RUN git fetch origin
-RUN git checkout $URANIUM_BRANCH
RUN mkdir build
WORKDIR $CURA_APP_DIR/CuraEngine/build
RUN cmake3 ..
@@ -50,6 +41,13 @@ RUN make install
# Make sure Cura can find CuraEngine
RUN ln -s /usr/local/bin/CuraEngine $CURA_APP_DIR/Cura
+# Tmp cleanup
+RUN rm -Rf /var/cache
+
# Run Cura
WORKDIR $CURA_APP_DIR/Cura
-CMD ["python3", "cura_app.py", "--headless"]
+ENV PYTHONPATH=${PYTHONPATH}:$CURA_APP_DIR/Uranium
+ENV DISPLAY=:1.0
+ADD run_in_docker.sh .
+RUN chmod +x ./run_in_docker.sh
+CMD "./run_in_docker.sh"