Microservice: EC Protocol Bridge & Plugins¶
The following section describes how to integrate a containerized Edge Control Protocol Bridge with plugins. These instructions assume an existing ECI installation, familiarity with building Docker containers and running the Edge Control Protocol Bridge.
Building: EC Protocol Bridge Container¶
The following section is applicable to:

The following steps detail how to build a Docker image which contains the Edge Control Protocol Bridge with plugins.
If not already completed, follow section Prepare the Build System for Microservices to prepare the build system.
Open a terminal on the build system and navigate to the extracted
Dockerfiles
directory. The contents of this directory should be as follows:$ ls application-containers bpf display-containers softplc-containers
Navigate to the
application-containers
directory. The contents of this directory should be as follows:$ ls ec-protocol-bridge tsn-vnet-txtime-assisted web-browser
Navigate to the
ec-protocol-bridge
directory. The contents of this directory should be as follows:$ ls assets build.sh Dockerfile README.md
Execute the
build.sh
script located in this directory to build the EC Protocol Bridge Docker image:/bin/bash build.sh
After the build has completed successfully, there will be a Docker image that has generated and tarballed:
Docker Image archive name
Description of Docker Image
ec-protocol-bridge.tar
Docker image which contains the EC Protocol Bridge and all the available plugins.
Executing: EC Protocol Bridge Container¶
The following section is applicable to:

Ensure that the Docker daemon is active. Run the following command to restart the Docker daemon.
Warning
All running Docker containers will also restart.
$ systemctl restart docker
The status of the Docker daemon can be verified with the following command:
$ systemctl status docker
Copy the Docker image created earlier to the target system.
Load the copied Docker image by performing the following command:
$ docker load < ec-protocol-bridge.tar
Check which Docker images are present on the target system with the following command:
$ docker images
The EC Protocol Bridge image that was loaded should be present in the list. Note the name and tag of the image for use in the following steps.
For example, on our system the output is as follows:
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ec-protocol-bridge v2.0 4297400814be 49 seconds ago 913MB
Run the container with the following command, where
<container>
and<tag>
correspond to the value on the target system:$ docker run -it --cap-add IPC_LOCK --network host <container>:<tag>
For example, on our system we performed the following command:
$ docker run --cap-add IPC_LOCK --network host --rm ec-protocol-bridge:v2.0
Customizing: EC Protocol Bridge Container¶
The following section is applicable to:

The following steps detail how to customer the Docker image which contains the Edge Control Protocol Bridge with plugins.
If not already completed, follow section Prepare the Build System for Microservices to prepare the build system.
Open a terminal on the build system and navigate to the extracted
Dockerfiles
directory. The contents of this directory should be as follows:$ ls application-containers bpf display-containers softplc-containers
Navigate to the
application-containers
directory. The contents of this directory should be as follows:$ ls ec-protocol-bridge tsn-vnet-txtime-assisted web-browser
Navigate to the
ec-protocol-bridge
directory. The contents of this directory should be as follows:$ ls assets build.sh Dockerfile README.md
Add a custom YAML file to be used by the EC Protocol Bridge to
./assets/config
in this directory.Open
Dockerfile
in a text editor, and modify line that contains theENTRYPOINT
definition to point to the YAML configuration file from the previous step. For example:ENTRYPOINT ["ec-bridge", "/opt/ec-protocol-bridge/config/custom_config.yaml"]
Follow the steps from Building: EC Protocol Bridge Container to build the EC Protocol Bridge container.
Follow the steps from Executing: EC Protocol Bridge Container to execute the EC Protocol Bridge container.