I am trying to build some machine vision software inside docker containers, it has worked previously, but now both devices are not able to access the camera.

It seems to be a configuration/update problem, as it has worked previously. I am not sure which of the updates could be the culprit.

Either calling "raspistill -i test.jpg" never returns (freeze) or this error appears:

mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7)
mmal: Failed to create camera_info component

As it has previously worked in the container, access to the device, and hardware-challenges are ruled out.

Any hints are appreciated.


Looking at the error message, you probably don't have the correct permissions. Try adding privileged: true to your docker-compose.yml file (or something like --privileged=true if you are using docker run).

(I assume there was a typo when you posted your command. To test, it should be raspistill -o test.jpg.)

| improve this answer | |
  • Thanks, typo indeed. But adding the privileged thing did not change anything. – Niels Jakob Buch Sep 12 '19 at 18:21
  • what was your typo? I'm getting this error too – driangle May 16 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.