nunofgs / docker-octoprint

Dockerfile to set up Octoprint with x86, armv6, armv7 and arm64 support!
https://hub.docker.com/r/nunofgs/octoprint/
GNU Affero General Public License v3.0
58 stars 32 forks source link

Is this image working well if there is no pluged webcam on the rpi ? #18

Closed ogattaz closed 5 years ago

ogattaz commented 5 years ago

If I create the container as docker create --device=/dev/video0 -p 8080:80 -v /var/volumes/octoprint/data:/data --name octoprint_with_webcam nunofgs/octoprint

I get this error message when I start the container when no webcam is pluged pi@raspberrypi:~ $ docker start octoprint_with_webcam Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/video0": no such file or directory Error: failed to start containers: octoprint_with_webcam

If I create the container without telling docker to bind a video device docker create -p 8090:80 -v /var/volumes/octoprint/data2:/data --name octoprint_without_webcam nunofgs/octoprint

I got no docker error message when I start the container but I got an http one 503 Service Unavailable No server is available to handle this request.

Thanks.

ogattaz commented 5 years ago

When I look inside the container, I find a normal behavior.

The content of "supervisord.log" file : 2019-05-26 08:25:35,687 CRIT Set uid to user 0 2019-05-26 08:25:35,762 INFO RPC interface 'supervisor' initialized 2019-05-26 08:25:35,763 CRIT Server 'inet_http_server' running without any HTTP authentication checking 2019-05-26 08:25:35,764 INFO supervisord started with pid 1 2019-05-26 08:25:36,773 INFO spawned: 'haproxy' with pid 10 2019-05-26 08:25:36,785 INFO spawned: 'octoprint' with pid 11 2019-05-26 08:25:37,791 INFO success: haproxy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2019-05-26 08:25:37,791 INFO success: octoprint entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

The processes running in the container root@4f02278199f6:/data# ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 08:25 ? 00:00:07 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf haproxy 10 1 0 08:25 ? 00:00:00 /usr/sbin/haproxy -db -f /etc/haproxy/haproxy.cfg ``root 11 1 0 08:25 ? 00:00:54 /usr/local/bin/python /usr/local/bin/octoprint serve --iknowwhatimdoing --basedir /data --host 0.0.0.0 root 51 0 0 09:55 pts/0 00:00:00 bash root 69 51 0 09:59 pts/0 00:00:00 ps -ef

nunofgs commented 5 years ago

Hi @ogattaz,

I can't seem to reproduce this. I tried to run:

$ docker run --rm -p 8090:80 -v /tmp/data2:/data --name octoprint_without_webcam nunofgs/octoprint

And as able to access octoprint on localhost:8090. Is it possible you have something in your data dir that is preventing the startup?

Can you try running the above command?

nunofgs commented 5 years ago

Closing for now. Please reopen if you manage to reproduce it.