A layered diagram of the software stack for Docker on an IoT Edge Gateway, showing hardware, the Debian-based RobustOS Pro, Docker, and application containers.

A Beginner's Guide to Docker on IoT Edge Gateways

Written by: Hubery Zhang

|

Published on

|

Time to read 5 min

Hubery Zhang, Technical Support Engineer at Robustel

Hubery Zhang is a Technical Support specialist at Robustel, focusing on industrial routers and edge computing gateways. With deep expertise in IoT connectivity and edge solutions, he assists global clients in deploying and troubleshooting robust systems, ensuring seamless integration of industrial routers, edge gateways, and cloud platforms for reliable and efficient operations. 

Summary

If you're in the world of IoT, you've undoubtedly heard of Docker. But what does it actually mean to run Docker on IoT Edge Gateways, and how do you get started?

This beginner-friendly guide demystifies containerization for the industrial edge. We'll cover what Docker is, why it's a game-changer for IoT, and provide a step-by-step tutorial on how to install and run your first container on a powerful industrial iot edge device like the Robustel EG5120.

By the end, you'll understand how to leverage Docker on IoT Edge Gateways to build more flexible, scalable, and secure applications.

Introduction: Why Docker is Taking Over the IoT Edge

So, you're looking to deploy an application on an   Industrial IoT Edge Gateway  . You have your code, but now you're facing a common headache: how do you ensure your application runs the same way on the gateway as it did on your development machine? How do you manage all its dependencies without creating conflicts?

For years, engineers have wrestled with this "it works on my machine" problem. This is where Docker comes in.  Docker  is a platform that packages your application and all its dependencies—libraries, code, and runtime—into a single, portable unit called a  container . Think of it as a lightweight, self-contained box that can run anywhere, from your laptop to a powerful industrial gateway like the   Robustel EG5120  . This guide will show you just how easy it is to get started with  Docker on IoT Edge Gateways .

An infographic explaining what a Docker container is, showing an application and its dependencies bundled together.

The Powerhouse: Robustel EG5120 Industrial Edge Gateway

Before we dive into the "how-to," let's look at the hardware. To properly run  Docker on IoT Edge Gateways , you need a device with enough processing power and a modern OS. The Robustel EG5120 is an industrial-grade edge computing gateway built for these kinds of containerized workloads.

Key EG5120 Specifications:

  • Processor: Quad-core 1.6 GHz Cortex-A53 CPU
  • NPU: 2.3 TOPS for machine learning inference
  • Memory & Storage: 2 GB DDR4 RAM, 16 GB eMMC Flash
  • Connectivity: 2 x Ethernet, 2 x RS232/RS485, 2 x DI/DO, optional Wi-Fi, Bluetooth, GPS/GNSS
  • Operating System: RobustOS Pro (Debian 11-based), supports Docker

This robust hardware provides a stable and powerful foundation for running your containerized applications reliably in the field.

Advantages of Using Docker on IoT Edge Gateways

So, why go to the trouble of containerizing your app? I've seen teams accelerate their deployment schedules by weeks by adopting this approach. Here are the core benefits:

  • Portability:  A container built on your laptop will run identically on the EG5120. This "build once, run anywhere" philosophy eliminates compatibility headaches.
  • Isolation:  Each container runs in its own isolated environment. This boosts security and prevents different applications from conflicting with each other over shared libraries.
  • Efficiency:  Containers share the host gateway's OS kernel, making them incredibly lightweight and fast compared to traditional virtual machines. This is crucial for resource-constrained edge devices.
  • Scalability & Rapid Deployment:  Once you have your container image, you can deploy hundreds or thousands of instances across your fleet of gateways effortlessly.

These perks make  Docker on IoT Edge Gateways  a true game-changer for modern IoT.A layered diagram of the software stack for Docker on an IoT Edge Gateway, showing hardware, the Debian-based RobustOS Pro, Docker, and application containers.

Step-by-Step Guide: Installing Docker on the Robustel EG5120

Let's get hands-on. This section guides you through the entire installation process.

Pre-Installation Setup

Before starting, ensure you have:

  • Access to the EG5120 router via SSH.
  • Internet connectivity via Ethernet or a 4G SIM card.
  • Basic Linux knowledge for terminal commands.
A screenshot of the Robustel EG5120 router dashboard, highlighting the firmware version under System Information.

Create Sudo Privileges

Before we start, we need to create sudo privileges directly through the web UI. Follow the steps below:

Navigate to the User Management Section Go to: Sudo user > Sudo User Settings Click on "Add" to create a new user.

Configure User Settings Fill in the required fields. (PS: Enter the old password for the sudo account. This option will be displayed when you need to change the sudo password.)

A screenshot of the Robustel EG5120 System/User Management page, showing the process of creating a new sudo user with username and password fields.

Installation Steps Using Convenience Script

For  Docker on IoT Edge Gateways  running a Debian-based OS like RobustOS Pro, the easiest method is to use Docker's official convenience script.

  1. Log in via SSH and Create a Sudo User:  First, log into the EG5120's web interface, create a sudouser for command-line access, and then use an SSH tool to log in.
  2. Download the Convenience Script:

Bash

 An image of a code snippet showing the command curl -fsSL https://get.docker.com -o get-docker.sh.


  1. Run the Script to Install Docker:

Bash

 An image of a code snippet showing the command sudo sh get-docker.sh.


  1. Add Your User to the Docker Group (Optional):  This allows you to run Docker commands without sudo. You'll need to log out and log back in for this to take effect.

Bash

 An image of a code snippet showing the command sudo usermod -aG docker $USER.


  1. Verify Installation:  Run the classic test container to confirm Docker is working correctly.

Bash

 An image of a code snippet showing the command docker run hello-world.


You should see a "Hello from Docker!" message.


Running Your First Container on the EG5120

Let's try a simple, practical example to see the power of  Docker on IoT Edge Gateways . We'll run an Nginx web server.

  1. Pull the Nginx Image:  This command downloads the official Nginx image from Docker Hub.

Bash

 An image of a code snippet showing the command docker pull nginx.


  1. Run the Nginx Container:  This command starts the web server and maps the gateway's port 80 to the container's port 80.

Bash

 An image of a code snippet showing the command docker run -d -p 80:80 --name webserver


  1. Check Container Status:

Bash

 An image of a code snippet showing the command docker ps.


  1. Access the Web Server:  Open a browser and navigate to http://. You should see the Nginx welcome page!

This simple example demonstrates how easily you can deploy complex applications. You can replace Nginx with IoT-specific containers, like an MQTT broker or a Node-RED instance.A screenshot showing the successful deployment of an Nginx web server in a Docker container on the Robustel EG5120 gateway.

Conclusion: Empowering Your Edge

Learning to use Docker on IoT Edge Gateways is a powerful skill that transforms how you deploy and manage applications. It moves you from manual, device-by-device setup to an automated, scalable, and reliable workflow. With a powerful device like the Robustel EG5120, which supports Docker on its Debian-based OS, you have a professional platform to build and scale your industrial IoT solutions with confidence.


Frequently Asked Questions (FAQ)

Q1: What’s the difference between Docker and virtual machines (VMs)?

A1: Containers share the host device's OS kernel, making them much more lightweight and efficient than VMs, which each require a full guest OS instance. This efficiency is critical for Docker on IoT Edge Gateways.

Q2: Can I run any Linux application on the EG5120 using Docker?

A2: Yes, if a Docker image exists for the ARM architecture (which is very common), you can run it. This containerization makes it possible to run a vast range of applications on the EG5120.

Q3: How do I update a Docker container on the EG5120?

A3: You can pull a new version of the image (docker pull myapp:latest), stop and remove the old container, and then run the new image. For large fleets, platforms like Robustel's RCMS can automate this OTA update process across all your gateways.