Reliably detect if DLE is running in a Docker container
Goal
In some environments, the virtualization role is defined incorrectly, resulting in the loss of mount points.
The original problem: https://database-lab-team.slack.com/archives/CTETNN484/p1658486251976309?thread_ts=1658486227.814619&cid=CTETNN484
To fix this, we need to reliably determine if DLE is running in a Docker container.
TODO / How to implement
Detect if DLE is running in a Docker container:
- check for the existence of
.dockerenv
file in the root folder (Docker creates a.dockerenv
file within the root folder of the container) - get rid of usage the
github.com/shirou/gopsutil/host
package: - use the
EngineProps
type to get the container name
Acceptance criteria
The DLE must correctly detect the working environment and mount volumes according to it