85 lines
3.6 KiB
Docker
85 lines
3.6 KiB
Docker
# Octoprint itself
|
|
ARG OP_MACHINE_NAME
|
|
|
|
#FROM balenalib/${OP_MACHINE_NAME:-%%RESIN_MACHINE_NAME%%}-debian:buster
|
|
FROM lpenz/devuan-beowulf-armhf-minbase
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# Balena /bin/sh stub is supposed to cleanup itself, but loops when initally called by apt...
|
|
# https://github.com/balena-io-library/base-images/issues/637
|
|
#RUN [[ -f /bin/sh.real ]] && rm /bin/sh && mv /bin/sh.real /bin/sh
|
|
|
|
RUN echo "deb http://deb.devuan.org/merged/ beowulf main contrib non-free" > /etc/apt/sources.list
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y python-pip python-dev python-setuptools \
|
|
libffi-dev libssl-dev \
|
|
python-virtualenv git libyaml-dev build-essential ffmpeg dbus \
|
|
jq zlib1g-dev libjpeg62-turbo-dev curl && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /opt/octoprint/OctoPrint
|
|
|
|
ARG release
|
|
|
|
# Travis often fails in getting latest octoprint release, this is why we
|
|
# have this while/re-try loop...
|
|
|
|
RUN if [ "${release}" = "latest" ]; then \
|
|
i=0; \
|
|
while true; do \
|
|
i=$(expr $i + 1); \
|
|
release=$(curl --silent --location https://api.github.com/repos/foosel/OctoPrint/releases/latest | jq -r .tag_name); \
|
|
[ "${release}" = "null" -a $i -lt 10 ] || break;\
|
|
echo "Cannot get release info -- retrying"; \
|
|
sleep 10; \
|
|
done; \
|
|
fi; \
|
|
echo "Building Octoprint ${release}"; \
|
|
git clone --branch "${release}" https://github.com/foosel/OctoPrint.git /opt/octoprint/OctoPrint && \
|
|
python -m virtualenv venv && \
|
|
./venv/bin/pip install MarkupSafe && \
|
|
./venv/bin/pip install zip && \
|
|
./venv/bin/pip install numpy && \
|
|
./venv/bin/python setup.py install
|
|
|
|
RUN python -m virtualenv env && \
|
|
./venv/bin/python -m pip install \
|
|
https://github.com/Octoprint/Octoprint-MQTT/archive/master.zip \
|
|
https://github.com/birkbjo/Octoprint-Themeify/archive/master.zip \
|
|
https://github.com/AlexVerrico/Octoprint-Display-ETA/archive/master.zip \
|
|
https://github.com/FormerLurker/Octolapse/archive/master.zip \
|
|
https://github.com/pablogventura/Octoprint-ETA/archive/master.zip \
|
|
https://github.com/1r0b1n0/Octoprint-Tempsgraph/archive/master.zip \
|
|
https://github.com/tpmullan/Octoprint-DetailedProgress/archive/master.zip \
|
|
https://github.com/marian42/octoprint-preheat/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-TasmotaMQTT/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-TabOrder/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-BedLevelVisualizer/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-Python3PluginCompatibilityCheck/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-UltimakerFormatPackage/archive/master.zip \
|
|
https://github.com/jneilliii/Octoprint-ConsolidateTempControl/archive/master.zip \
|
|
https://github.com/mikedmor/Octoprint_Multicam/archive/master.zip \
|
|
https://github.com/OllisGit/Octoprint-PrintJobHistory/releases/latest/download/master.zip \
|
|
https://github.com/OllisGit/Octoprint-FilamentManager/releases/latest/download/master.zip \
|
|
https://github.com/OllisGit/Octoprint-DisplayLayerProgress/releases/latest/download/master.zip \
|
|
https://github.com/fraschetti/Octoslack/archive/master.zip \
|
|
https://github.com/MoonshineSG/Octoprint-MultiColors/archive/master.zip \
|
|
https://github.com/imrahil/Octoprint-PrintHistory/archive/master.zip \
|
|
https://github.com/Kragrathea/Octoprint-PrettyGCode/archive/master.zip \
|
|
https://github.com/AliceGrey/OctoPrintKlipperPlugin/archive/master.zip
|
|
##https://github.com/mmone/OctoPrintKlipper/archive/master.zip
|
|
|
|
WORKDIR /opt/octoprint
|
|
|
|
COPY bin bin/
|
|
COPY etc etc/
|
|
|
|
VOLUME /opt/octoprint/data
|
|
|
|
EXPOSE 5000
|
|
|
|
CMD ["/opt/octoprint/bin/run.sh"]
|