This the Source Repo for the OctoPrint Docker Image.
It supports the following architectures automatically:
- arm32v6 (Raspberry Pi, etc.)
- x86
Tag | Octoprint |
---|---|
latest | Latest Stable |
beta | ReleaseCandidate |
dev | master |
Device | Working? |
---|---|
Raspberry Pi 2b | ✅ |
Raspberry Pi 3b+ | ✅ |
Raspberry Pi Zero W | ❌ |
docker run -d \
--restart=unless-stopped \
--name=OctoPrint \
-p 1337:80 \
--device=/dev/ttyUSB0:/dev/ttyUSB0 \
-v /home/pi/Docker/OctoPrint/data:/data \
-e CAMERA_DEV_1=false \
reloxx13/octoprint:latest
docker run -d \
--restart=unless-stopped \
--name=OctoPrint \
-p 1337:80 \
--device=/dev/video0:/dev/video0 \
--device=/dev/ttyUSB0:/dev/ttyUSB0 \
-v /home/pi/Docker/OctoPrint/data:/data \
-e STREAMER_FLAGS_1="-y -n -r 1280x720 -f 10" \
reloxx13/octoprint:latest
More about Webcams: Webcams known to work
Variable | Description | Default Value CAM 1 | Default Value CAM 2 |
---|---|---|---|
CAMERA_DEV_1, CAMERA_DEV_2 | The camera device node | /dev/video0 |
/dev/video2 |
MJPEG_STREAMER_AUTOSTART_1, MJPEG_STREAMER_AUTOSTART_2 | Start the camera automatically | true |
false |
STREAMER_FLAGS_1, STREAMER_FLAGS_2 | Flags to pass to mjpg_streamer | -y -n -r 640x480 |
-y -n -r 640x480 |
- Bind the camera to the docker using --device=/dev/video0:/dev/videoX
- Optionally, change
STREAMER_FLAGS_1
to your preferred settings (ex:-y -n -r 1280x720 -f 10
) - Use the following settings in octoprint:
webcam:
stream: /webcam1/?action=stream
snapshot: http://127.0.0.1:8080/?action=snapshot
ffmpeg: /usr/bin/ffmpeg
v4l2-ctl --list-devices
fswebcam -v --list-controls --device /dev/video2
fswebcam -d /dev/video2 -r 640x480 test1.jpeg
lsusb
BUS:DEVICE
lsusb -s 001:007 -v | egrep "Width|Height"
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
Forked from https://github.com/nunofgs/docker-octoprint
Original credits go to https://bitbucket.org/a2z-team/docker-octoprint