Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java')
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index ffa20b85f8..0addcfdf5f 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -1056,14 +1056,24 @@ public class DockerConnection implements IDockerConnection, Closeable {
}
hbuilder.portBindings(realBindings);
}
- if (hc.volumesFrom() != null)
+ if (hc.volumesFrom() != null) {
hbuilder.volumesFrom(hc.volumesFrom());
+ }
+ // FIXME: add the 'memory()' method in the IDockerHostConfig
+ // interface
+ if (((DockerHostConfig) hc).memory() != null) {
+ hbuilder.memory(((DockerHostConfig) hc).memory());
+ }
+ // FIXME: add the 'cpuShares()' method in the IDockerHostConfig
+ // interface
+ if (((DockerHostConfig) hc).cpuShares() != null
+ && ((DockerHostConfig) hc).cpuShares().longValue() > 0) {
+ hbuilder.cpuShares(((DockerHostConfig) hc).cpuShares());
+ }
ContainerConfig.Builder builder = ContainerConfig.builder()
.hostname(c.hostname()).domainname(c.domainname())
- .user(c.user()).memory(c.memory())
- .memorySwap(c.memorySwap()).cpuShares(c.cpuShares())
- .cpuset(c.cpuset()).attachStdin(c.attachStdin())
+ .user(c.user()).attachStdin(c.attachStdin())
.attachStdout(c.attachStdout())
.attachStderr(c.attachStderr()).tty(c.tty())
.openStdin(c.openStdin()).stdinOnce(c.stdinOnce())

Back to the top