diff mbox series

[bug#67574] services: Fix oci-container-service-type container user.

Message ID 20231201224505.586-1-goodoldpaul@autistici.org
State New
Headers show
Series [bug#67574] services: Fix oci-container-service-type container user. | expand

Commit Message

Giacomo Leidi Dec. 1, 2023, 10:45 p.m. UTC
The oci-container-configuration supports two user fields: one is the
user, from the host system, under whose authority the OCI-backed
Shepherd service is run; the other is an optional user/UID that can be
passed to the docker run invokation to override the user defined in the
OCI image.

The user from the host system is incorrectly passed to docker run
command, this patches reverts the incorrect behavior and passes the
correct container-user field value.

* gnu/services/docker.scm (oci-container-configuration): Fix the user
passed to the docker run invokation.
---
 gnu/services/docker.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 842a11f1caa1bb929c427722ad9d7b7c1ff65727

Comments

Ludovic Courtès Dec. 10, 2023, 9:23 p.m. UTC | #1
Giacomo Leidi <goodoldpaul@autistici.org> skribis:

> The oci-container-configuration supports two user fields: one is the
> user, from the host system, under whose authority the OCI-backed
> Shepherd service is run; the other is an optional user/UID that can be
> passed to the docker run invokation to override the user defined in the
> OCI image.
>
> The user from the host system is incorrectly passed to docker run
> command, this patches reverts the incorrect behavior and passes the
> correct container-user field value.
>
> * gnu/services/docker.scm (oci-container-configuration): Fix the user
> passed to the docker run invokation.

Applied, thanks!
diff mbox series

Patch

diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index ebea0a473a..72ef7d74db 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -374,7 +374,7 @@  (define oci-container-configuration->options
           (network
            (oci-container-configuration-network config))
           (user
-           (oci-container-configuration-user config))
+           (oci-container-configuration-container-user config))
           (workdir
            (oci-container-configuration-workdir config)))
       (apply append