diff options
author | Jeff Johnston | 2018-08-28 16:54:31 +0000 |
---|---|---|
committer | Jeff Johnston | 2018-08-28 23:51:57 +0000 |
commit | 2f94c0fc92af9c113e8533904d61ef1cf1175240 (patch) | |
tree | ed89f802b5d4278fd08267b00dc07506bf8f737d | |
parent | ca993dead1eae62b3948d9926fe8c648d9432fb0 (diff) | |
download | org.eclipse.linuxtools-2f94c0fc92af9c113e8533904d61ef1cf1175240.tar.gz org.eclipse.linuxtools-2f94c0fc92af9c113e8533904d61ef1cf1175240.tar.xz org.eclipse.linuxtools-2f94c0fc92af9c113e8533904d61ef1cf1175240.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>
(cherry picked from commit c858954b2fb58812ea3c3eed111d78116b5738f6)
Reviewed-on: https://git.eclipse.org/r/128224
-rw-r--r-- | containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/docker/ui/launch/ContainerLauncher.java | 15 |
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); |