This repository contains a Dockerfile and a script to build a Docker image containing the OpenCV libraries.
The Dockerfile will create a default user inside the image (user: dckr, password: dckr) that maps to the user who ran the script. The script will also add a function (cvdocker) to the ~/.bashrc that will make it faster to run the container with the correct parameters.
To build the Docker image run builder_script.sh, you can check the help with
./builder_script.sh -h
(if you cannot run the file remember to add the executable bit with chmod +x builder_script.sh).
To compile OpenCV with Pyhton support pass in "ON" (without quotes) as first argument. You can also set the OpenCV version with the second argument but note that this script was only tested with OpenCV 4.0.1