Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-05-23 13:41:45 -0400
committerJeff Johnston2019-05-23 14:52:47 -0400
commit4e15a953cede020aaa8017763e2b95696411253e (patch)
tree256921e506b4408181955db295ecd78f17b96604
parente8bd21bcaae586aff1fd5e69cbb5ec0a655e3dcc (diff)
downloadorg.eclipse.linuxtools-4e15a953cede020aaa8017763e2b95696411253e.tar.gz
org.eclipse.linuxtools-4e15a953cede020aaa8017763e2b95696411253e.tar.xz
org.eclipse.linuxtools-4e15a953cede020aaa8017763e2b95696411253e.zip
Bug 547602 - For Container launch, also specify gid
- fix ContainerLaunch.runCommand() to set both the uid and gid Change-Id: Ic80ded6b4b8a0664ba25fcf217390e57d6541866 Reviewed-on: https://git.eclipse.org/r/142687 Tested-by: Linux Tools Bot <linuxtools-bot@eclipse.org> Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
index 657cc34c40..e77d1fcd86 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java
@@ -1600,9 +1600,12 @@ public class ContainerLauncher {
builder = builder.entryPoint(entrypoint);
}
}
- // switch to user id for Linux so output is accessible
+ // switch to user id and group id for Linux so output is accessible
if (uid != null) {
- builder = builder.user(uid.toString());
+ String id = uid.toString();
+ if (gid != null)
+ id += ":" + gid.toString(); //$NON-NLS-1$
+ builder = builder.user(id);
}
// TODO: add group id here when supported by DockerHostConfig.Builder

Back to the top