aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/docker/dockerdevice.h
diff options
context:
space:
mode:
authorMarcus Tillmanns <[email protected]>2025-04-01 15:28:47 +0200
committerMarcus Tillmanns <[email protected]>2025-04-03 06:43:52 +0000
commit51b28b63ec5c2080be8ee9903113686b34ff2ed1 (patch)
tree82f111062b18bd1ad554f248cfcea3780131315c /src/plugins/docker/dockerdevice.h
parentd06870bfe872125de0eb5740610b0069472d8c58 (diff)
Docker: Capture Environment from entry point
Docker containers often come with custom entry point scripts that inject Environment variables into the shell. Since our bridge and other custom processes are not spawned via the entry point they don't automatically get access to the variables, breaking the KitDetector or the Terminal if the user hopes to have them set. As a workaround, we run "printenv" when a device is created and store the output in its settings. We then use this environment as the device environment when creating processes. For old configs, we fetch the environment in fromMap in case it is not set. Fixes: QTCREATORBUG-32135 Change-Id: I16c04d391907698fd9f66fc3d33d068accb8054a Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/docker/dockerdevice.h')
-rw-r--r--src/plugins/docker/dockerdevice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h
index 22f07d530d3..3f9e8455d85 100644
--- a/src/plugins/docker/dockerdevice.h
+++ b/src/plugins/docker/dockerdevice.h
@@ -3,6 +3,8 @@
#pragma once
+#include "dockerdeviceenvironmentaspect.h"
+
#include <coreplugin/documentmanager.h>
#include <projectexplorer/devicesupport/idevice.h>
@@ -68,6 +70,7 @@ public:
Utils::FilePathAspect clangdExecutableAspect{this};
Utils::StringSelectionAspect network{this};
Utils::StringAspect extraArgs{this};
+ DockerDeviceEnvironmentAspect environment{this};
Utils::TextDisplay containerStatus{this};