This is a Dockerfile to set up OctoPrint. It supports the following architectures automatically:
- x86
- arm32v6 (Raspberry Pi, etc.)
1.3.11
,latest
(Dockerfile)1.3.10
(Dockerfile)1.3.9
(Dockerfile)1.3.8
(Dockerfile)1.3.7
(Dockerfile)1.3.6
(Dockerfile)master
(Automatically built daily from OctoPrint'smaster
branch)
Device | Working? |
---|---|
Raspberry Pi 2b | ✅ |
Raspberry Pi 3b+ | ✅ |
Raspberry Pi Zero W | ❌ |
$ docker run \
--device=/dev/video0 \
-p 80:80 \
-v /mnt/data:/data \
nunofgs/octoprint
Variable | Description | Default Value |
---|---|---|
CAMERA_DEV | The camera device node | /dev/video0 |
MJPEG_STREAMER_AUTOSTART | Start the camera automatically | true |
STREAMER_FLAGS | Flags to pass to mjpg_streamer | -y -n -r 640x480 |
Cura engine integration was very outdated (using version 15.04.6
) and was removed.
It will return once OctoPrint supports python3 (needed for the newest versions of cura engine).
- Bind the camera to the docker using --device=/dev/video0:/dev/videoX
- Optionally, change
STREAMER_FLAGS
to your preferred settings (ex:-y -n -r 1280x720 -f 10
) - Use the following settings in octoprint:
webcam:
stream: /webcam/?action=stream
snapshot: http://127.0.0.1:8080/?action=snapshot
ffmpeg: /usr/bin/ffmpeg
This image uses supervisord
in order to launch 3 processes: haproxy, octoprint and mjpeg-streamer.
This means you can disable/enable the camera at will from within octoprint by editing your config.yaml
:
system:
actions:
- action: streamon
command: supervisorctl start mjpeg-streamer
confirm: false
name: Start webcam
- action: streamoff
command: supervisorctl stop mjpeg-streamer
confirm: false
name: Stop webcam
Original credits go to https://bitbucket.org/a2z-team/docker-octoprint. I initially ported this to the raspberry pi 2 and later moved to a multiarch image.
MIT