If I had understood correctly:
We can use a docker image of something instead of installing it.
I don't want to install openCV.
So I install the image:
docker pull spmallick/opencv-docker:opencv
I have a really simple cpp file which use openCV.
What should i do now to compile my file with this image.
in the terminal run
docker run -it --name myopencv spmallick/opencv-docker:opencv
open new terminal and copy your cpp file to the running container. for example i copy the file 1.cpp to tmp folder to myopencv container.
docker cp.\1.cpp myopencv:/tmp
return to the running container and run g++ <filename.cpp>
** the image you pulled already has all build-essential installed
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.