From 36b89e0e0582a79707e0d3ed525ca9a61d9c2ca1 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Thu, 10 Nov 2016 17:50:24 +0200 Subject: [PATCH 1/2] Avoid passing empty array for command and entrypoint to Docker API Signed-off-by: Kaloyan Raev --- .../api/environment/server/compose/ComposeServiceImpl.java | 7 +------ .../che/api/environment/server/model/CheServiceImpl.java | 6 ------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/compose/ComposeServiceImpl.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/compose/ComposeServiceImpl.java index e29cc6df4bb..60239375566 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/compose/ComposeServiceImpl.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/compose/ComposeServiceImpl.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + import org.eclipse.che.api.environment.server.compose.deserializer.EnvironmentDeserializer; import java.util.ArrayList; @@ -127,9 +128,6 @@ public ComposeServiceImpl withBuild(BuildContextImpl build) { * Override the default entrypoint. */ public List getEntrypoint() { - if (entrypoint == null) { - entrypoint = new ArrayList<>(); - } return entrypoint; } @@ -146,9 +144,6 @@ public ComposeServiceImpl withEntrypoint(List entrypoint) { * Override the default command. */ public List getCommand() { - if (command == null) { - command = new ArrayList<>(); - } return command; } diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model/CheServiceImpl.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model/CheServiceImpl.java index 8eb7b886a22..3678aaa314c 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model/CheServiceImpl.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model/CheServiceImpl.java @@ -136,9 +136,6 @@ public CheServiceImpl withBuild(CheServiceBuildContextImpl build) { * Override the default entrypoint. */ public List getEntrypoint() { - if (entrypoint == null) { - entrypoint = new ArrayList<>(); - } return entrypoint; } @@ -155,9 +152,6 @@ public CheServiceImpl withEntrypoint(List entrypoint) { * Override the default command. */ public List getCommand() { - if (command == null) { - command = new ArrayList<>(); - } return command; } From a264758db034f6421cf918b987857f9ac1173b2f Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Thu, 10 Nov 2016 17:53:46 +0200 Subject: [PATCH 2/2] Use official mysql docker image in the java-mysql stack --- ide/che-core-ide-stacks/src/main/resources/stacks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/che-core-ide-stacks/src/main/resources/stacks.json b/ide/che-core-ide-stacks/src/main/resources/stacks.json index 7601f600406..c4727a6ebc1 100644 --- a/ide/che-core-ide-stacks/src/main/resources/stacks.json +++ b/ide/che-core-ide-stacks/src/main/resources/stacks.json @@ -46,7 +46,7 @@ } }, "recipe": { - "content": "services:\n db:\n image: codenvy/mysql\n environment:\n MYSQL_DATABASE: petclinic\n MYSQL_USER: petclinic\n MYSQL_PASSWORD: password\n mem_limit: 1073741824\n dev-machine:\n image: codenvy/ubuntu_jdk8\n mem_limit: 2147483648\n depends_on:\n - db", + "content": "services:\n db:\n image: mysql\n environment:\n MYSQL_ROOT_PASSWORD: password\n MYSQL_DATABASE: petclinic\n MYSQL_USER: petclinic\n MYSQL_PASSWORD: password\n mem_limit: 1073741824\n dev-machine:\n image: codenvy/ubuntu_jdk8\n mem_limit: 2147483648\n depends_on:\n - db", "contentType": "application/x-yaml", "type": "compose" }