- Is needed to be installed Docker in your system
- It necessary that your computer has webcam
To build the dockerfile you have to run:
docker build -t jfhuete/pycon-opencv .
To instance the jfhuete/pycon-opencv image you have run:
docker run -it \
-v "$(pwd)"/app:/home/opencv/app \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
--device /dev/video0 \
--name pycon-opencv jfhuete/pycon-opencv
This command create a docker volume and bind it with the local workspace.
When you restart the container you can view the result of your changes.
Execute in other terminal while the docker is running:
docker exec -it -u root pycon-opencv /bin/bash
To instance the jfhuete/pycon-opencv image you have run:
docker run -it \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
--device /dev/video0 \
--name pycon-opencv jfhuete/pycon-opencv
To restart the container you have to run this command:
docker start -ai pycon-opencv
To quit container, you have to push q key in any camera windows, or ctrl+c in terminal