Run adapter inside Docker container
- Last UpdatedJul 14, 2026
- 2 minute read
The following procedures contain instructions on how to run the adapter inside a Docker container with different options enabled.
Run the Docker container with REST access enabled
To run the adapter inside a Docker container with access to its REST API from the local host, complete the following steps:
-
Use the docker container image <adapter> created previously.
-
Type the following in the command line (sudo may be necessary):
docker run -d --network host <adapter>
Port 5590 is accessible from the host, and you can make REST calls to the adapter from applications on the local host computer. In this example, all data stored by the adapter is stored in the container itself. When you delete the container, the stored data is also deleted.
Run the Docker container with persistent storage
To run the adapter inside a Docker container while using the host for persistent storage, complete the following steps. This procedure also enables access to the adapter REST API from the local host.
-
Type the following in the command line (sudo may be necessary):
docker build --build-arg APP_UID=$(id -u) -t <adapter> .
Note: 'id -u' gives the user in the Docker container the same permissions as the effective user of the host system. You can supply another value to APP_UID so long as the user passed has permissions to write to the host directory supplied in the next step.
-
Type the following in the command line (sudo may be necessary):
docker run -d --network host -v /<componentType>:/usr/share/OSIsoft/ <adapter>
Port 5590 is accessible from the host, and you can make REST calls to the adapter from applications on the local host computer.
In this example, all data that is written to the container is instead written to the host directory and the host directory is a directory on the local machine, /<adapter>. You can specify any directory. Ensure that the User ID passed as the 'APP_UID' build argument has write permissions for the directory specified.