LOGGER.debug("Executing Docker Attach Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
AttachContainerCmd attachContainerCmd = client.attachContainerCmd(containerId);
Boolean stdOut = DockerHelper.getProperty(DockerConstants.DOCKER_STD_OUT, configuration, message, Boolean.class);
if (stdOut != null && stdOut) {
attachContainerCmd.withStdOut(stdOut);
}
Boolean stdErr = DockerHelper.getProperty(DockerConstants.DOCKER_STD_ERR, configuration, message, Boolean.class);
if (stdErr != null && stdErr) {
attachContainerCmd.withStdErr(stdErr);
}
Boolean logs = DockerHelper.getProperty(DockerConstants.DOCKER_LOGS, configuration, message, Boolean.class);
if (logs != null && logs) {
attachContainerCmd.withLogs(logs);
}
Boolean timestamps = DockerHelper.getProperty(DockerConstants.DOCKER_TIMESTAMPS, configuration, message, Boolean.class);
if (timestamps != null && timestamps) {
attachContainerCmd.withTimestamps(timestamps);
}
Boolean followStream = DockerHelper.getProperty(DockerConstants.DOCKER_FOLLOW_STREAM, configuration, message, Boolean.class);
if (followStream != null && followStream) {
attachContainerCmd.withFollowStream(followStream);
}
return attachContainerCmd;
}