Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-27 15:11:00 -0400
committerJeff Johnston2018-08-27 15:49:15 -0400
commit34042b2bc78b77a69d725aa03131732cf9d8c31a (patch)
tree11f78803ca30dad6984c1cc066434d9a049f0090
parentb2490acec8ccd44b6a4cd51bea661689a4ef2c6a (diff)
downloadorg.eclipse.linuxtools-34042b2bc78b77a69d725aa03131732cf9d8c31a.tar.gz
org.eclipse.linuxtools-34042b2bc78b77a69d725aa03131732cf9d8c31a.tar.xz
org.eclipse.linuxtools-34042b2bc78b77a69d725aa03131732cf9d8c31a.zip
Bug 538241 - C/C++ Container App should support Entrypoint
- modify ContainerLauncher to pass on EntryPoint from Image to Container configuration Change-Id: I4dc5bdfc3f559b7537424687cd74e8a266a0ae04 Reviewed-on: https://git.eclipse.org/r/128154 Tested-by: CI Bot 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, 7 insertions, 0 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 9d64ec35e0..85e960335f 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
@@ -1532,6 +1532,13 @@ public class ContainerLauncher {
.openStdin(supportStdin).cmd(cmdList).image(imageName)
.workingDir(workingDir);
+ // preserve any entry point specified in the image
+ if (info.containerConfig() != null) {
+ List<String> entrypoint = info.containerConfig().entrypoint();
+ if (entrypoint != null && !entrypoint.isEmpty()) {
+ builder = builder.entryPoint(entrypoint);
+ }
+ }
// switch to user id for Linux so output is accessible
if (uid != null) {
builder = builder.user(uid.toString());

Back to the top