Sign inSign up

badsmoke/octoprint

By badsmoke

•Updated over 6 years ago

up to date octoprint in python3&python2 for all relevant arches

Image
1

4.3K

badsmoke/octoprint repository overview

⁠Octoprint as docker with python3

a modified version of the original and outdated image of Octoprint

it is the version 1.40 with pyhton 3.8

I have also built a python2 version, because not all plugins have been ported to python3 yet. So far there is no reason why not, I would still prefer python3.

I noticed that I forgot one "dot" in the tags, it will be fixed next week.

the python3 version is available for all three major architectures (amd64, arm64, arm) the python2 will follow soon

original(https://github.com/OctoPrint/docker⁠)

⁠arch
-amd64
-arm64
-arm

MAINTAINER badsmoke [email protected]⁠

⁠docker-compose

version: '2'
services:
  octoprint:
    build: .
    image: badsmoke/octoprint
    container_name: octoprint
    ports:
      - 5000:5000
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0
    volumes:
     - ./config:/home/octoprint/.octoprint

⁠Dockerfile

FROM python:3.8-slim-buster
EXPOSE 5000
LABEL maintainer badsmoke "[email protected]"

ENV CURA_VERSION=15.04.6
ARG tag=master

WORKDIR /opt/octoprint


#install necessary packages
RUN apt update
RUN apt install wget git xz-utils g++ make -y
RUN rm -rf /var/lib/apt/lists/*

#install venv            
RUN pip install virtualenv

#install ffmpeg
RUN cd /tmp \
  && wget -O ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz \
	&& mkdir -p /opt/ffmpeg \
	&& tar xvf ffmpeg.tar.xz -C /opt/ffmpeg --strip-components=1 \
  && rm -Rf /tmp/*

#install Cura
RUN cd /tmp \
  && wget https://github.com/Ultimaker/CuraEngine/archive/${CURA_VERSION}.tar.gz \
  && tar -zxf ${CURA_VERSION}.tar.gz \
	&& cd CuraEngine-${CURA_VERSION} \
	&& mkdir build \
	&& make \
	&& mv -f ./build /opt/cura/ \
  && rm -Rf /tmp/*

#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 \
	&& ./venv/bin/python setup.py install
VOLUME /home/octoprint/.octoprint


CMD ["/opt/octoprint/venv/bin/octoprint", "serve"]

Tag summary

Content type

Image

Digest

Size

259.7 MB

Last updated

over 6 years ago

docker pull badsmoke/octoprint