Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-28 12:54:31 -0400
committerJeff Johnston2018-08-28 15:00:48 -0400
commitc858954b2fb58812ea3c3eed111d78116b5738f6 (patch)
tree32fa7161276bba3ecf3f22bd49569b4416b69495
parent34042b2bc78b77a69d725aa03131732cf9d8c31a (diff)
downloadorg.eclipse.linuxtools-c858954b2fb58812ea3c3eed111d78116b5738f6.tar.gz
org.eclipse.linuxtools-c858954b2fb58812ea3c3eed111d78116b5738f6.tar.xz
org.eclipse.linuxtools-c858954b2fb58812ea3c3eed111d78116b5738f6.zip
Bug 538241 - C/C++ Container App should support Entrypoint
- change launch() method similar to changes made in runCommand() Change-Id: Ie0ac63f73d4f59e54024d4c79d83d0b73d49d1a5 Reviewed-on: https://git.eclipse.org/r/128215 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.java15
1 files changed, 15 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 85e960335f..9efeafd1ff 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
@@ -908,6 +908,21 @@ public class ContainerLauncher {
connection.getImages();
}
+ IDockerImageInfo imageInfo = connection.getImageInfo(image);
+ if (imageInfo == null) {
+ Display.getDefault()
+ .syncExec(() -> MessageDialog.openError(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ DVMessages.getString(ERROR_LAUNCHING_CONTAINER),
+ Messages.getFormattedString("ContainerLaunch.imageNotFound.error", image)));
+ return;
+ }
+
+ IDockerContainerConfig imageConfig = imageInfo.config();
+ if (imageConfig != null && imageConfig.entrypoint() != null) {
+ builder = builder.entryPoint(imageConfig.entrypoint());
+ }
+
DockerHostConfig.Builder hostBuilder = new DockerHostConfig.Builder()
.privileged(privilegedMode);

Back to the top