Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM ultimaker/cura-build-environment:1
  2. # Environment vars for easy configuration
  3. ENV CURA_APP_DIR=/srv/cura
  4. # Ensure our sources dir exists
  5. RUN mkdir $CURA_APP_DIR
  6. # Setup CuraEngine
  7. ENV CURA_ENGINE_BRANCH=master
  8. WORKDIR $CURA_APP_DIR
  9. RUN git clone -b $CURA_ENGINE_BRANCH --depth 1 https://github.com/Ultimaker/CuraEngine
  10. WORKDIR $CURA_APP_DIR/CuraEngine
  11. RUN mkdir build
  12. WORKDIR $CURA_APP_DIR/CuraEngine/build
  13. RUN cmake3 ..
  14. RUN make
  15. RUN make install
  16. # TODO: setup libCharon
  17. # Setup Uranium
  18. ENV URANIUM_BRANCH=master
  19. WORKDIR $CURA_APP_DIR
  20. RUN git clone -b $URANIUM_BRANCH --depth 1 https://github.com/Ultimaker/Uranium
  21. # Setup materials
  22. ENV MATERIALS_BRANCH=master
  23. WORKDIR $CURA_APP_DIR
  24. RUN git clone -b $MATERIALS_BRANCH --depth 1 https://github.com/Ultimaker/fdm_materials materials
  25. # Setup Cura
  26. WORKDIR $CURA_APP_DIR/Cura
  27. ADD . .
  28. RUN mv $CURA_APP_DIR/materials resources/materials
  29. # Make sure Cura can find CuraEngine
  30. RUN ln -s /usr/local/bin/CuraEngine $CURA_APP_DIR/Cura
  31. # Run Cura
  32. WORKDIR $CURA_APP_DIR/Cura
  33. ENV PYTHONPATH=${PYTHONPATH}:$CURA_APP_DIR/Uranium
  34. RUN chmod +x ./CuraEngine
  35. RUN chmod +x ./run_in_docker.sh
  36. CMD "./run_in_docker.sh"