2020-11-30 19:44:26 +00:00
|
|
|
FROM ubuntu:20.04
|
2018-06-03 22:27:11 +00:00
|
|
|
|
2020-06-05 15:43:37 +00:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
ENV TZ=America/New_York
|
|
|
|
|
2020-05-08 14:35:10 +00:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2020-02-04 02:28:09 +00:00
|
|
|
cmake \
|
2020-11-30 19:44:26 +00:00
|
|
|
libjpeg8-dev \
|
2020-02-04 02:28:09 +00:00
|
|
|
g++ \
|
|
|
|
wget \
|
|
|
|
unzip \
|
2020-04-03 16:19:11 +00:00
|
|
|
git \
|
2020-11-30 19:44:26 +00:00
|
|
|
python2 \
|
|
|
|
virtualenv \
|
|
|
|
python3-dev \
|
2020-09-16 00:12:57 +00:00
|
|
|
python3-virtualenv \
|
2020-11-30 19:44:26 +00:00
|
|
|
tzdata
|
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
#Install Octoprint
|
|
|
|
RUN git clone --branch $tag https://github.com/foosel/OctoPrint.git /opt/octoprint \
|
|
|
|
&& virtualenv venv \
|
2020-05-08 18:13:12 +00:00
|
|
|
&& ./venv/bin/pip 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 \
|
2020-05-29 20:05:50 +00:00
|
|
|
https://github.com/AlexVerrico/Octoprint-Display-ETA/archive/master.zip \
|
2019-03-30 13:04:02 +00:00
|
|
|
https://github.com/1r0b1n0/OctoPrint-Tempsgraph/archive/master.zip \
|
2020-05-08 14:37:00 +00:00
|
|
|
https://github.com/tpmullan/OctoPrint-DetailedProgress/archive/master.zip \
|
2020-09-15 16:35:37 +00:00
|
|
|
https://github.com/AliceGrey/OctoprintKlipperPlugin/archive/master.zip \
|
2019-03-30 13:04:02 +00:00
|
|
|
https://github.com/jneilliii/OctoPrint-TabOrder/archive/master.zip \
|
2020-02-04 02:28:48 +00:00
|
|
|
https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/archive/master.zip \
|
2020-02-04 13:58:22 +00:00
|
|
|
https://github.com/OctoPrint/OctoPrint-MQTT/archive/master.zip \
|
2020-04-02 15:20:42 +00:00
|
|
|
https://github.com/birkbjo/OctoPrint-Themeify/archive/master.zip \
|
2020-04-03 16:19:11 +00:00
|
|
|
https://github.com/jneilliii/OctoPrint-Python3PluginCompatibilityCheck/archive/master.zip \
|
2020-06-08 14:26:06 +00:00
|
|
|
https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip \
|
|
|
|
https://github.com/marian42/octoprint-preheat/archive/master.zip \
|
2020-09-14 20:02:13 +00:00
|
|
|
https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \
|
2020-06-08 14:26:06 +00:00
|
|
|
https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \
|
2020-06-14 14:11:56 +00:00
|
|
|
https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/master.zip \
|
|
|
|
https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/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
|
|
|
|
|
2020-05-29 20:04:17 +00:00
|
|
|
RUN apt-get install -y sudo
|
2018-06-03 22:27:11 +00:00
|
|
|
|
|
|
|
COPY klippy.sudoers /etc/sudoers.d/klippy
|
|
|
|
|
|
|
|
RUN useradd -ms /bin/bash klippy
|
|
|
|
|
2020-04-03 16:19:11 +00:00
|
|
|
# This is to allow the install script to run without error
|
|
|
|
RUN ln -s /bin/true /bin/systemctl
|
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
USER octoprint
|
|
|
|
|
|
|
|
WORKDIR /home/octoprint
|
|
|
|
|
2020-11-30 19:44:26 +00:00
|
|
|
# Update the install script for Ubuntu 20
|
|
|
|
RUN sed -i 's/python-virtualenv //' ./klipper/scripts/install-ubuntu-18.04.sh
|
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
RUN git clone https://github.com/KevinOConnor/klipper
|
|
|
|
|
2020-04-03 16:19:11 +00:00
|
|
|
RUN ./klipper/scripts/install-ubuntu-18.04.sh
|
2018-06-03 22:27:11 +00:00
|
|
|
|
|
|
|
USER root
|
|
|
|
|
2020-04-03 16:19:11 +00:00
|
|
|
# Clean up hack for install script
|
|
|
|
RUN rm -f /bin/systemctl
|
|
|
|
|
2018-06-03 22:27:11 +00:00
|
|
|
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"]
|