#Docker – About ports, IPs and more to access a container hosted in a #RaspberryPi

Hi !

So, my CustomVision.ai image is build and running in a container in my Raspberry Pi 3. It’s time to see if I can use it from other devices in the same network. When I run my image I defined IP and Port, but if you want to know these information, the following command is very useful

sudo docker port <CONTAINER ID>

01 docker port

So, my container is listening at 127.0.0.1 in port 80. That’s cool for local processing, however I want to access my container from other devices in the same network. In order to do this, I’ll run my image with the following command (I’m not defining the IP, just the port 80)

sudo docker run -p 80:80 -d <IMAGE ID>

02 docker port 80 and success run

The container is using the port 80, and docker is taking over this port in my device. My Raspberry PI device IP is [192.168.1.58], so I can go back and make some tests using Postman to analyze images in the device.

03 docker image analysis from postman

That’s cool. A small CustomVision image analyzer server for less than $30 !

Happy coding!

Greetings @ Toronto

El Bruno

References

My Posts

  1. Object recognition with Custom Vision and ONNX in Windows applications using WinML
  2. Object recognition with Custom Vision and ONNX in Windows applications using WinML
  3. Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, drawing frames
  4. Object recognition with Custom Vision and ONNX in Windows applications using Windows ML, calculate FPS
  5. Can’t install Docker on Windows 10 Home, need Pro or Enterprise
  6. Running a Custom Vision project in a local Docker Container
  7. Analyzing images in a Console App using a Custom Vision project in a Docker Container
  8. Analyzing images using PostMan from a Custom Vision project hosted in a Docker Container
  9. Building the CustomVision.ai project in Docker in a RaspberryPi
  10. Container dies immediately upon successful start in a RaspberryPi. Of course, it’s all about TensorFlow dependencies

Windows 10 and YOLOV2 for Object Detection Series

Advertisement

11 comments

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: