Skip to content

Commit 5bb51e0

Browse files
authored
Fix for using the official mysql image in composite stacks (eclipse-che#3049)
* Avoid passing empty array for command and entrypoint to Docker API * Use official mysql docker image in the java-mysql stack Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
1 parent 3975d69 commit 5bb51e0

3 files changed

Lines changed: 1 addition & 13 deletions

File tree

  • ide/che-core-ide-stacks/src/main/resources
  • plugins/plugin-docker/che-plugin-docker-compose/src/main/java/org/eclipse/che/plugin/docker/compose
  • wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model

ide/che-core-ide-stacks/src/main/resources/stacks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747
},
4848
"recipe": {
49-
"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",
49+
"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",
5050
"contentType": "application/x-yaml",
5151
"type": "compose"
5252
}

plugins/plugin-docker/che-plugin-docker-compose/src/main/java/org/eclipse/che/plugin/docker/compose/ComposeServiceImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ public ComposeServiceImpl withBuild(BuildContext build) {
130130
* Override the default entrypoint.
131131
*/
132132
public List<String> getEntrypoint() {
133-
if (entrypoint == null) {
134-
entrypoint = new ArrayList<>();
135-
}
136133
return entrypoint;
137134
}
138135

@@ -149,9 +146,6 @@ public ComposeServiceImpl withEntrypoint(List<String> entrypoint) {
149146
* Override the default command.
150147
*/
151148
public List<String> getCommand() {
152-
if (command == null) {
153-
command = new ArrayList<>();
154-
}
155149
return command;
156150
}
157151

wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/model/CheServiceImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ public CheServiceImpl withBuild(CheServiceBuildContextImpl build) {
137137
* Override the default entrypoint.
138138
*/
139139
public List<String> getEntrypoint() {
140-
if (entrypoint == null) {
141-
entrypoint = new ArrayList<>();
142-
}
143140
return entrypoint;
144141
}
145142

@@ -156,9 +153,6 @@ public CheServiceImpl withEntrypoint(List<String> entrypoint) {
156153
* Override the default command.
157154
*/
158155
public List<String> getCommand() {
159-
if (command == null) {
160-
command = new ArrayList<>();
161-
}
162156
return command;
163157
}
164158

0 commit comments

Comments
 (0)