If you are using Chrome, then it only allows access to the camera over HTTPS or from localhost. If you are using Docker, I suspect you are not accessing the application via a localhost URL or over HTTPS, so Chrome is not allowing access to the camera.
https://developer.chrome.com/blog/chrome-47-webrtc/?hl=en#public_service_announcements