Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-27 19:11:00 +0000
committerJeff Johnston2018-08-27 21:44:29 +0000
commitca993dead1eae62b3948d9926fe8c648d9432fb0 (patch)
tree159d32baf7f22129249091e23442edb23e28700f
parent63c9677b59a996b3813987f75f6111109dd84ecf (diff)
downloadorg.eclipse.linuxtools-ca993dead1eae62b3948d9926fe8c648d9432fb0.tar.gz
org.eclipse.linuxtools-ca993dead1eae62b3948d9926fe8c648d9432fb0.tar.xz
org.eclipse.linuxtools-ca993dead1eae62b3948d9926fe8c648d9432fb0.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> (cherry picked from commit 34042b2bc78b77a69d725aa03131732cf9d8c31a) Reviewed-on: https://git.eclipse.org/r/128157
-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