diff options
Diffstat (limited to 'gnu/services/containers.scm')
-rw-r--r-- | gnu/services/containers.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm index c9eadea9b4..0c3d6463e4 100644 --- a/gnu/services/containers.scm +++ b/gnu/services/containers.scm @@ -1277,7 +1277,12 @@ by CONFIG through RUNTIME-CLI." (define environment-variables #~(append (list #$@host-environment) - (list #$@(oci-runtime-state-runtime-environment runtime-state)))) + ;; In case this specific container is not run through the user + ;; provisioned by the oci-service-type, its environment is different + ;; from the globally provisioned one and must be recomputed. + (list #$@(if (maybe-value-set? user) + (oci-runtime-system-environment runtime user) + (oci-runtime-state-runtime-environment runtime-state))))) (define invocation (oci-container-run-invocation (oci-container-configuration->oci-container-invocation |