Tag Archives: docker

Using Docker with cv2.imshow and Mac

Download and install Quartz. On newer Macs they no longer shipped with X11. Thanks to a user in the comments in this blog post I found this recipe open -a XQuartz ip=$(ifconfig en0 | grep inet | awk ‘$1==”inet” {print $2}’) xhost + $ip # container being used: dymat/opencv docker run -it –rm -e DISPLAY=$ip:0 -v […]

Continue reading →
Post Tagged with , , , , ,

Connecting to host port from Docker container

In my case I wanted to connect to a MySQL database that my laptop was SSH’d to. # I had port forwarding in my ssh connection to fwd port 3306, the mysql port. cat ~/.ssh/config Host memsql HostName User ubuntu LocalForward 3306 127.0.0.1:3306 # on my laptop I start the ssh connection (use -N if […]

Continue reading →
Post Tagged with , ,