2018-06-03 22:27:11 +00:00
|
|
|
|
|
|
|
FROM python:2.7
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y cmake libjpeg62-turbo-dev g++ wget unzip psmisc
|
|
|
|
|
|
|
|
EXPOSE 5000
|
|
|
|
|
|
|
|
ARG tag=master
|
|
|
|
|
|
|
|
WORKDIR /opt/octoprint
|
|
|
|
|
|
|
|
#Create an octoprint user
|
|
|
|
RUN useradd -ms /bin/bash octoprint && adduser octoprint dialout
|
|
|
|
RUN chown octoprint:octoprint /opt/octoprint
|
|
|
|
USER octoprint
|
|
|
|
|
|
|
|
#This fixes issues with the volume command setting wrong permissions
|
|
|
|
RUN mkdir /home/octoprint/.octoprint
|
|
|
|
|
2019-03-30 13:04:02 +00:00
|
|
|
RUN echo v1.3.10
|
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
#Install Octoprint
|
|
|
|
RUN git clone --branch $tag https://github.com/foosel/OctoPrint.git /opt/octoprint \
|
|
|
|
&& virtualenv venv \
|
2018-06-30 22:55:08 +00:00
|
|
|
&& ./venv/bin/python setup.py install
|
2018-06-03 22:27:11 +00:00
|
|
|
|
2019-03-30 13:04:02 +00:00
|
|
|
RUN /opt/octoprint/venv/bin/python -m pip install \
|
|
|
|
https://github.com/pablogventura/Octoprint-ETA/archive/master.zip \
|
|
|
|
https://github.com/1r0b1n0/OctoPrint-Tempsgraph/archive/master.zip \
|
|
|
|
https://github.com/dattas/OctoPrint-DetailedProgress/archive/master.zip \
|
|
|
|
https://github.com/mmone/OctoPrintKlipper/archive/master.zip \
|
|
|
|
https://github.com/jneilliii/OctoPrint-TabOrder/archive/master.zip \
|
2019-08-13 16:34:27 +00:00
|
|
|
https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/archive/master.zip
|
2018-06-03 22:27:11 +00:00
|
|
|
|
|
|
|
# Installing from sillyfrog until the PR is merged to master
|
2019-03-30 13:04:02 +00:00
|
|
|
RUN /opt/octoprint/venv/bin/python -m pip install https://github.com/sillyfrog/OctoPrint-PrintHistory/archive/master.zip
|
2018-06-30 22:55:08 +00:00
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
VOLUME /home/octoprint/.octoprint
|
|
|
|
|
|
|
|
### Klipper setup ###
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
RUN apt-get install -y sudo
|
|
|
|
|
|
|
|
COPY klippy.sudoers /etc/sudoers.d/klippy
|
|
|
|
|
|
|
|
RUN useradd -ms /bin/bash klippy
|
|
|
|
|
|
|
|
USER octoprint
|
|
|
|
|
|
|
|
WORKDIR /home/octoprint
|
|
|
|
|
|
|
|
RUN git clone https://github.com/KevinOConnor/klipper
|
|
|
|
|
|
|
|
RUN ./klipper/scripts/install-octopi.sh
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
COPY start.py /
|
2019-03-30 13:04:02 +00:00
|
|
|
COPY runklipper.py /
|
2018-06-03 22:27:11 +00:00
|
|
|
|
|
|
|
CMD ["/start.py"]
|