You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/10-prerequisities/30-docker/60-custom-configs.md
+40-5Lines changed: 40 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Custom configs for containers
6
6
7
7
# Custom configs for containers
8
8
9
-
## Problem definition
9
+
###Problem definition
10
10
11
11
A users has a **docker image** from which his software can be started.
12
12
The image contains pre-compiled binaries with a **default configuration**.
@@ -18,17 +18,19 @@ Configuration can be facilited by several mechanisms:
18
18
* shell scripts,
19
19
* additional files loaded in runtime.
20
20
21
-
These **custom configuration files**, which are handed to the software in runtime, need to be exposed to the **container** runing from the **user's docker image**.
21
+
There are two ways how to provide **custom configuration files** to the system:
22
+
1. expose them to the **container** runing from the **user's docker image**
23
+
2. paste them as a part of the **compose.yaml** file directly from the Portainer
22
24
23
-
## Our solution
25
+
## Solution 1. - Through docker image
24
26
25
27
We pack the configurations (**shared data**) in a dedicated transport image which is easily delivered to the robot.
26
28
Then, **during runtime**, this image spawns a container in which the data is coppied to a **shared docker volume**.
27
29
Then, the user's containers are started, all mounting the same **shared docker volume** and accessing the configuration data.
28
30
29
31

30
32
31
-
## Packing shared data to a transport image
33
+
###Packing shared data to a transport image
32
34
33
35
The following minimalistic dockerfile coppies the `shared_data` subfolder in the **transport docker image**:
34
36
@@ -47,7 +49,7 @@ Select the appropriate `tag` and `platform`.
This is **compose.yaml** for starting Docker container for the Realsense camera. Configuration in the yaml format is under the **configs** section, in the **content** subsection. This content is copied into the file specified in the service section, in the configs/target subsections - **/custom_config.yaml**. It is then passed to the ROS2 launchfile through **command** subsection. The user only needs to modify the **configs** section.
0 commit comments