Skip to content

Commit 9137f79

Browse files
committed
add docs about container engine socket detection
1 parent ef412ff commit 9137f79

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,34 @@ The following features are supported by the plugin:
5151

5252
## Documentation
5353

54+
### Container Engine Detection
55+
56+
The plugin primarily uses the unix socket to interact with the container engine.
57+
58+
By default, the socket is auto detected by checking a list of known socket paths, and taking the first matching socket that exists. If no socket is found, then the application will repeat the socket detection and eventually giving up after a period of time.
59+
60+
The following table shows the list container engine socket paths and the order of precedence (where the first existing socket is used).
61+
62+
|Socket Path|Description|
63+
|-----------|-----------|
64+
|$DOCKER_HOST|Default Docker Environment variable|
65+
|$CONTAINER_HOST|Default Podman Environment variable|
66+
|unix:///run/user/{uid}/docker.sock|Docker rootless|
67+
|unix://$XDG_RUNTIME_DIR/podman/podman.sock|Podman rootless|
68+
|unix:///tmp/storage-run-{uid}/podman/podman.sock|Podman rootless|
69+
|unix:///var/run/docker.sock|Docker (rootful)|
70+
|unix:///run/podman/podman.sock|Podman (rootful)|
71+
|unix:///run/user/0/podman/podman.sock|Podman (rootful)|
72+
73+
Where `{uid}` is either the value of the `SUDO_UID` environment variable (if present), or the process's effective user ID.
74+
75+
If your device is not finding the correct socket path for your container engine, then you can explicitly set the socket path in the `tedge-container-plugin.toml` file. Below shows an example of such a snippet which forces the usage of the rootful podman api endpoint. You will need to restart the tedge-container-plugin service before the setting will take effect.
76+
77+
```toml
78+
[container]
79+
host = "unix:///run/podman/podman.sock"
80+
```
81+
5482
### Install/remove single containers
5583

5684
Containers can be installed and removed via the Cumulocity Software Management interface in the Device Management Application.

0 commit comments

Comments
 (0)