This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch inactivity_integration
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/inactivity_integration by this
push:
new a7903eb DLAB-471 adding parameter that will remove docker container
for check inactivity after it is executed
a7903eb is described below
commit a7903ebb471ea97fe9df4a1281bcfa043374a43c
Author: bhliva <[email protected]>
AuthorDate: Mon Mar 4 17:49:16 2019 +0200
DLAB-471 adding parameter that will remove docker container for check
inactivity after it is executed
---
.../com/epam/dlab/backendapi/core/commands/RunDockerCommand.java | 5 +++++
.../dlab/backendapi/service/impl/CheckInactivityServiceImpl.java | 2 ++
2 files changed, 7 insertions(+)
diff --git
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
index 500fb6f..e536643 100644
---
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
+++
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/core/commands/RunDockerCommand.java
@@ -254,6 +254,11 @@ public class RunDockerCommand implements CmdCommand {
return this;
}
+ public RunDockerCommand withRemove(){
+ options.add("--rm");
+ return this;
+ }
+
@Override
public String toCMD() {
StringBuilder sb = new StringBuilder(command);
diff --git
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityServiceImpl.java
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityServiceImpl.java
index 6b28961..a9d0514 100644
---
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityServiceImpl.java
+++
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/CheckInactivityServiceImpl.java
@@ -44,6 +44,7 @@ public class CheckInactivityServiceImpl extends DockerService
implements CheckIn
startComputationalCallbackListener(userName, dto, uuid);
final RunDockerCommand dockerCommand = new RunDockerCommand()
.withInteractive()
+ .withRemove()
.withName(nameContainer(uuid,
DockerAction.CHECK_INACTIVITY.toString()))
.withVolumeForRootKeys(configuration.getKeyDirectory())
.withVolumeForResponse(configuration.getKeyLoaderDirectory())
@@ -65,6 +66,7 @@ public class CheckInactivityServiceImpl extends DockerService
implements CheckIn
startExploratoryCallbackListener(userName, dto, uuid);
final RunDockerCommand dockerCommand = new RunDockerCommand()
.withInteractive()
+ .withRemove()
.withName(nameContainer(uuid,
DockerAction.CHECK_INACTIVITY.toString()))
.withVolumeForRootKeys(configuration.getKeyDirectory())
.withVolumeForResponse(configuration.getKeyLoaderDirectory())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]