|
|
@@ -237,10 +237,11 @@ public class DockerImpl implements Docker {
|
|
|
Map<String, String> map = containerConfig.getVolumes().getMap();
|
|
|
List<Bind> list = new ArrayList<>();
|
|
|
for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
|
- String key = entry.getKey();
|
|
|
- String value = entry.getValue();
|
|
|
- Volume volume2 = new Volume(value);
|
|
|
- Bind bind = new Bind(key, volume2);
|
|
|
+ String hostPath = entry.getValue();
|
|
|
+ String containerPath = entry.getKey();
|
|
|
+
|
|
|
+ Volume volume2 = new Volume(containerPath);
|
|
|
+ Bind bind = new Bind(hostPath, volume2);
|
|
|
list.add(bind);
|
|
|
}
|
|
|
hostConfig.withBinds(list);
|
|
|
@@ -266,9 +267,6 @@ public class DockerImpl implements Docker {
|
|
|
@Override
|
|
|
public void onNext(Frame object) {
|
|
|
if (object.getStreamType().equals(StreamType.STDERR)) {
|
|
|
- if (list.size() > 100) {
|
|
|
- list.clear();
|
|
|
- }
|
|
|
list.add(object.toString());
|
|
|
}
|
|
|
}
|
|
|
@@ -296,7 +294,7 @@ public class DockerImpl implements Docker {
|
|
|
if (Boolean.TRUE.equals(state.getRunning())) {
|
|
|
dockerClient.stopContainerCmd(containerId).exec();
|
|
|
dockerClient.removeContainerCmd(containerId).exec();
|
|
|
- throw new Exception("docker build timeout");
|
|
|
+ throw new Exception("docker build timeout after 300 seconds");
|
|
|
} else if (exitCode != null && exitCode == 0) {
|
|
|
dockerClient.removeContainerCmd(containerId).exec();
|
|
|
} else {
|