diff --git a/.classpath b/.classpath
new file mode 100644
index 00000000..f8ce0d30
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
index 2fc61df1..29f405c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,5 @@ target
# Ignore all log files
*.log
+
+test-output/
diff --git a/pom.xml b/pom.xml
index 7e24e77e..4ba76cd5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -272,5 +272,17 @@
+
+
+ deployment
+ Internal Releases
+ http://54.197.251.122:8081/nexus/content/repositories/releases/
+
+
+ deployment
+ Internal Releases
+ http://54.197.251.122:8081/nexus/content/repositories/snapshots/
+
+
diff --git a/src/main/java/com/kpelykh/docker/client/DockerClient.java b/src/main/java/com/kpelykh/docker/client/DockerClient.java
index 7312d5fa..4981893f 100644
--- a/src/main/java/com/kpelykh/docker/client/DockerClient.java
+++ b/src/main/java/com/kpelykh/docker/client/DockerClient.java
@@ -643,7 +643,7 @@ public ClientResponse build(File dockerFolder, String tag) throws DockerExceptio
FileUtils.copyFileToDirectory(dockerFile, tmpDockerContextFolder);
for (String cmd : dockerFileContent) {
- if (StringUtils.startsWithIgnoreCase(cmd.trim(), "ADD")) {
+ if (StringUtils.startsWithIgnoreCase(cmd.trim(), "ADD ")) {
String addArgs[] = StringUtils.split(cmd, " \t");
if (addArgs.length != 3) {
throw new DockerException(String.format("Wrong format on line [%s]", cmd));
diff --git a/src/main/java/com/kpelykh/docker/client/model/ContainerConfig.java b/src/main/java/com/kpelykh/docker/client/model/ContainerConfig.java
index ff7ffc4e..cf8c2441 100644
--- a/src/main/java/com/kpelykh/docker/client/model/ContainerConfig.java
+++ b/src/main/java/com/kpelykh/docker/client/model/ContainerConfig.java
@@ -37,6 +37,7 @@ public class ContainerConfig {
@JsonProperty("Domainname") private String domainName = "";
// FIXME Is this the right type? -BJE
@JsonProperty("ExposedPorts") private Map exposedPorts;
+
public Map getExposedPorts() {
return exposedPorts;
diff --git a/src/main/java/com/kpelykh/docker/client/model/ContainerInspectResponse.java b/src/main/java/com/kpelykh/docker/client/model/ContainerInspectResponse.java
index 04d2f8c9..597677e6 100644
--- a/src/main/java/com/kpelykh/docker/client/model/ContainerInspectResponse.java
+++ b/src/main/java/com/kpelykh/docker/client/model/ContainerInspectResponse.java
@@ -1,247 +1,246 @@
-package com.kpelykh.docker.client.model;
-
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-import java.util.Arrays;
-import java.util.Map;
-
-/**
- *
- * @author Konstantin Pelykh (kpelykh@gmail.com)
- *
- */
-public class ContainerInspectResponse {
-
- @JsonProperty("ID")
- private String id;
-
- @JsonProperty("Created")
- private String created;
-
- @JsonProperty("Path")
- private String path;
-
- @JsonProperty("Args")
- private String[] args;
-
- @JsonProperty("Config")
- public ContainerConfig config;
-
- @JsonProperty("State")
- private ContainerState state;
-
- @JsonProperty("Image")
- private String image;
-
- @JsonProperty("NetworkSettings")
- private NetworkSettings networkSettings;
-
- @JsonProperty("SysInitPath")
- private String sysInitPath;
-
- @JsonProperty("ResolvConfPath")
- private String resolvConfPath;
-
- @JsonProperty("Volumes")
- private Map volumes;
-
- @JsonProperty("VolumesRW")
- private Map volumesRW;
-
- @JsonProperty("HostnamePath")
- private String hostnamePath;
-
- @JsonProperty("HostsPath")
- private String hostsPath;
-
- @JsonProperty("Name")
- private String name;
-
- @JsonProperty("Driver")
- private String driver;
-
- @JsonProperty("HostConfig")
- private HostConfig hostConfig;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getCreated() {
- return created;
- }
-
- public void setCreated(String created) {
- this.created = created;
- }
-
- public String getPath() {
- return path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String[] getArgs() {
- return args;
- }
-
- public void setArgs(String[] args) {
- this.args = args;
- }
-
- public ContainerConfig getConfig() {
- return config;
- }
-
- public void setConfig(ContainerConfig config) {
- this.config = config;
- }
-
- public ContainerState getState() {
- return state;
- }
-
- public void setState(ContainerState state) {
- this.state = state;
- }
-
- public String getImage() {
- return image;
- }
-
- public void setImage(String image) {
- this.image = image;
- }
-
- public NetworkSettings getNetworkSettings() {
- return networkSettings;
- }
-
- public void setNetworkSettings(NetworkSettings networkSettings) {
- this.networkSettings = networkSettings;
- }
-
- public String getSysInitPath() {
- return sysInitPath;
- }
-
- public void setSysInitPath(String sysInitPath) {
- this.sysInitPath = sysInitPath;
- }
-
- public String getResolvConfPath() {
- return resolvConfPath;
- }
-
- public void setResolvConfPath(String resolvConfPath) {
- this.resolvConfPath = resolvConfPath;
- }
-
- public Map getVolumes() {
- return volumes;
- }
-
- public void setVolumes(Map volumes) {
- this.volumes = volumes;
- }
-
- public Map getVolumesRW() {
- return volumesRW;
- }
-
- public void setVolumesRW(Map volumesRW) {
- this.volumesRW = volumesRW;
- }
-
- public String getHostnamePath() {
- return hostnamePath;
- }
-
- public void setHostnamePath(String hostnamePath) {
- this.hostnamePath = hostnamePath;
- }
-
- public String getHostsPath() {
- return hostsPath;
- }
-
- public void setHostsPath(String hostsPath) {
- this.hostsPath = hostsPath;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDriver() {
- return driver;
- }
-
- public void setDriver(String driver) {
- this.driver = driver;
- }
-
- public HostConfig getHostConfig() {
- return hostConfig;
- }
-
- public void setHostConfig(HostConfig hostConfig) {
- this.hostConfig = hostConfig;
- }
-
- public class NetworkSettings {
-
- @JsonProperty("IPAddress") public String ipAddress;
- @JsonProperty("IPPrefixLen") public int ipPrefixLen;
- @JsonProperty("Gateway") public String gateway;
- @JsonProperty("Bridge") public String bridge;
- @JsonProperty("PortMapping") public Map> portMapping;
- @JsonProperty("Ports") public Ports ports;
-
- @Override
- public String toString() {
- return "NetworkSettings{" +
- "ports=" + ports +
- ", portMapping=" + portMapping +
- ", bridge='" + bridge + '\'' +
- ", gateway='" + gateway + '\'' +
- ", ipPrefixLen=" + ipPrefixLen +
- ", ipAddress='" + ipAddress + '\'' +
- '}';
- }
- }
-
- public class ContainerState {
-
- @JsonProperty("Running") public boolean running;
- @JsonProperty("Pid") public int pid;
- @JsonProperty("ExitCode") public int exitCode;
- @JsonProperty("StartedAt") public String startedAt;
- @JsonProperty("Ghost") public boolean ghost;
- @JsonProperty("FinishedAt") private String finishedAt;
-
- @Override
- public String toString() {
- return "ContainerState{" +
- "running=" + running +
- ", pid=" + pid +
- ", exitCode=" + exitCode +
- ", startedAt='" + startedAt + '\'' +
- ", ghost=" + ghost +
- ", finishedAt='" + finishedAt + '\'' +
- '}';
- }
- }
-
-}
+package com.kpelykh.docker.client.model;
+
+
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+/**
+ *
+ * @author Konstantin Pelykh (kpelykh@gmail.com)
+ *
+ */
+public class ContainerInspectResponse {
+
+ @JsonProperty("ID")
+ private String id;
+
+ @JsonProperty("Created")
+ private String created;
+
+ @JsonProperty("Path")
+ private String path;
+
+ @JsonProperty("Args")
+ private String[] args;
+
+ @JsonProperty("Config")
+ public ContainerConfig config;
+
+ @JsonProperty("State")
+ private ContainerState state;
+
+ @JsonProperty("Image")
+ private String image;
+
+ @JsonProperty("NetworkSettings")
+ private NetworkSettings networkSettings;
+
+ @JsonProperty("SysInitPath")
+ private String sysInitPath;
+
+ @JsonProperty("ResolvConfPath")
+ private String resolvConfPath;
+
+ @JsonProperty("Volumes")
+ private Map volumes;
+
+ @JsonProperty("VolumesRW")
+ private Map volumesRW;
+
+ @JsonProperty("HostnamePath")
+ private String hostnamePath;
+
+ @JsonProperty("HostsPath")
+ private String hostsPath;
+
+ @JsonProperty("Name")
+ private String name;
+
+ @JsonProperty("Driver")
+ private String driver;
+
+
+ @JsonProperty("HostConfig")
+ private HostConfig hostConfig;
+
+ public HostConfig getHostConfig() {
+ return hostConfig;
+ }
+ public String getDriver() {
+ return driver;
+ }
+ public void setHostConfig(HostConfig hostConfig) {
+ this.hostConfig = hostConfig;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getCreated() {
+ return created;
+ }
+
+ public void setCreated(String created) {
+ this.created = created;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String[] getArgs() {
+ return args;
+ }
+
+ public void setArgs(String[] args) {
+ this.args = args;
+ }
+
+ public ContainerConfig getConfig() {
+ return config;
+ }
+
+ public void setConfig(ContainerConfig config) {
+ this.config = config;
+ }
+
+ public ContainerState getState() {
+ return state;
+ }
+
+ public void setState(ContainerState state) {
+ this.state = state;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public NetworkSettings getNetworkSettings() {
+ return networkSettings;
+ }
+
+ public void setNetworkSettings(NetworkSettings networkSettings) {
+ this.networkSettings = networkSettings;
+ }
+
+ public String getSysInitPath() {
+ return sysInitPath;
+ }
+
+ public void setSysInitPath(String sysInitPath) {
+ this.sysInitPath = sysInitPath;
+ }
+
+ public String getResolvConfPath() {
+ return resolvConfPath;
+ }
+
+ public void setResolvConfPath(String resolvConfPath) {
+ this.resolvConfPath = resolvConfPath;
+ }
+
+ public Map getVolumes() {
+ return volumes;
+ }
+
+ public void setVolumes(Map volumes) {
+ this.volumes = volumes;
+ }
+
+ public Map getVolumesRW() {
+ return volumesRW;
+ }
+
+ public void setVolumesRW(Map volumesRW) {
+ this.volumesRW = volumesRW;
+ }
+
+ public String getHostnamePath() {
+ return hostnamePath;
+ }
+
+ public void setHostnamePath(String hostnamePath) {
+ this.hostnamePath = hostnamePath;
+ }
+
+ public String getHostsPath() {
+ return hostsPath;
+ }
+
+ public void setHostsPath(String hostsPath) {
+ this.hostsPath = hostsPath;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public void setDriver(String driver) {
+ this.driver = driver;
+ }
+
+ public class NetworkSettings {
+
+ @JsonProperty("IPAddress") public String ipAddress;
+ @JsonProperty("IPPrefixLen") public int ipPrefixLen;
+ @JsonProperty("Gateway") public String gateway;
+ @JsonProperty("Bridge") public String bridge;
+ @JsonProperty("PortMapping") public Map> portMapping;
+ @JsonProperty("Ports") public Ports ports;
+
+ @Override
+ public String toString() {
+ return "NetworkSettings{" +
+ "ports=" + ports +
+ ", portMapping=" + portMapping +
+ ", bridge='" + bridge + '\'' +
+ ", gateway='" + gateway + '\'' +
+ ", ipPrefixLen=" + ipPrefixLen +
+ ", ipAddress='" + ipAddress + '\'' +
+ '}';
+ }
+ }
+
+ public class ContainerState {
+
+ @JsonProperty("Running") public boolean running;
+ @JsonProperty("Pid") public int pid;
+ @JsonProperty("ExitCode") public int exitCode;
+ @JsonProperty("StartedAt") public String startedAt;
+ @JsonProperty("Ghost") public boolean ghost;
+ @JsonProperty("FinishedAt") private String finishedAt;
+
+ @Override
+ public String toString() {
+ return "ContainerState{" +
+ "running=" + running +
+ ", pid=" + pid +
+ ", exitCode=" + exitCode +
+ ", startedAt='" + startedAt + '\'' +
+ ", ghost=" + ghost +
+ ", finishedAt='" + finishedAt + '\'' +
+ '}';
+ }
+ }
+
+}
diff --git a/src/main/java/com/kpelykh/docker/client/model/HostConfig.java b/src/main/java/com/kpelykh/docker/client/model/HostConfig.java
index e124cf0d..e6a15093 100644
--- a/src/main/java/com/kpelykh/docker/client/model/HostConfig.java
+++ b/src/main/java/com/kpelykh/docker/client/model/HostConfig.java
@@ -1,144 +1,144 @@
-package com.kpelykh.docker.client.model;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-import java.util.Arrays;
-
-/**
- *
- * @author Konstantin Pelykh (kpelykh@gmail.com)
- *
- */
-public class HostConfig {
-
- @JsonProperty("Binds")
- private String[] binds;
-
- @JsonProperty("ContainerIDFile")
- private String containerIDFile;
-
- @JsonProperty("LxcConf")
- private LxcConf[] lxcConf;
-
-
- @JsonProperty("Links")
- private String[] links;
-
- @JsonProperty("PortBindings")
- private Ports portBindings;
-
- @JsonProperty("Privileged")
- private boolean privileged;
-
- @JsonProperty("PublishAllPorts")
- private boolean publishAllPorts;
-
- public HostConfig() {
- this.binds = null;
- }
-
-
- public String[] getBinds() {
- return binds;
- }
-
- public void setBinds(String[] binds) {
- this.binds = binds;
- }
-
- public String getContainerIDFile() {
- return containerIDFile;
- }
-
- public void setContainerIDFile(String containerIDFile) {
- this.containerIDFile = containerIDFile;
- }
-
- public LxcConf[] getLxcConf() {
- return lxcConf;
- }
-
- public void setLxcConf(LxcConf[] lxcConf) {
- this.lxcConf = lxcConf;
- }
-
- public String[] getLinks() {
- return links;
- }
-
- public void setLinks(String[] links) {
- this.links = links;
- }
-
- public Ports getPortBindings() {
- return portBindings;
- }
-
- public void setPortBindings(Ports portBindings) {
- this.portBindings = portBindings;
- }
-
- public boolean isPrivileged() {
- return privileged;
- }
-
- public void setPrivileged(boolean privileged) {
- this.privileged = privileged;
- }
-
- public boolean isPublishAllPorts() {
- return publishAllPorts;
- }
-
- public void setPublishAllPorts(boolean publishAllPorts) {
- this.publishAllPorts = publishAllPorts;
- }
-
- @Override
- public String toString() {
- return "HostConfig{" +
- "binds=" + Arrays.toString(binds) +
- ", containerIDFile='" + containerIDFile + '\'' +
- ", lxcConf=" + Arrays.toString(lxcConf) +
- ", links=" + Arrays.toString(links) +
- ", portBindings=" + portBindings +
- ", privileged=" + privileged +
- ", publishAllPorts=" + publishAllPorts +
- '}';
- }
-
- public class LxcConf {
- @JsonProperty("Key")
- public String key;
-
- @JsonProperty("Value")
- public String value;
-
- public LxcConf(String key, String value) {
- this.key = key;
- this.value = value;
- }
-
- public LxcConf() {
- }
-
- public String getKey() {
- return key;
- }
-
- public LxcConf setKey(String key) {
- this.key = key;
- return this;
- }
-
- public String getValue() {
- return value;
- }
-
- public LxcConf setValue(String value) {
- this.value = value;
- return this;
- }
-
- }
-}
+package com.kpelykh.docker.client.model;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+import java.util.Arrays;
+
+/**
+ *
+ * @author Konstantin Pelykh (kpelykh@gmail.com)
+ *
+ */
+public class HostConfig {
+
+ @JsonProperty("Binds")
+ private String[] binds;
+
+ @JsonProperty("ContainerIDFile")
+ private String containerIDFile;
+
+ @JsonProperty("LxcConf")
+ private LxcConf[] lxcConf;
+
+
+ @JsonProperty("Links")
+ private String[] links;
+
+ @JsonProperty("PortBindings")
+ private Ports portBindings;
+
+ @JsonProperty("Privileged")
+ private boolean privileged;
+
+ @JsonProperty("PublishAllPorts")
+ private boolean publishAllPorts;
+
+ public HostConfig() {
+ this.binds = null;
+ }
+
+
+ public String[] getBinds() {
+ return binds;
+ }
+
+ public void setBinds(String[] binds) {
+ this.binds = binds;
+ }
+
+ public String getContainerIDFile() {
+ return containerIDFile;
+ }
+
+ public void setContainerIDFile(String containerIDFile) {
+ this.containerIDFile = containerIDFile;
+ }
+
+ public LxcConf[] getLxcConf() {
+ return lxcConf;
+ }
+
+ public void setLxcConf(LxcConf[] lxcConf) {
+ this.lxcConf = lxcConf;
+ }
+
+ public String[] getLinks() {
+ return links;
+ }
+
+ public void setLinks(String[] links) {
+ this.links = links;
+ }
+
+ public Ports getPortBindings() {
+ return portBindings;
+ }
+
+ public void setPortBindings(Ports portBindings) {
+ this.portBindings = portBindings;
+ }
+
+ public boolean isPrivileged() {
+ return privileged;
+ }
+
+ public void setPrivileged(boolean privileged) {
+ this.privileged = privileged;
+ }
+
+ public boolean isPublishAllPorts() {
+ return publishAllPorts;
+ }
+
+ public void setPublishAllPorts(boolean publishAllPorts) {
+ this.publishAllPorts = publishAllPorts;
+ }
+
+ @Override
+ public String toString() {
+ return "HostConfig{" +
+ "binds=" + Arrays.toString(binds) +
+ ", containerIDFile='" + containerIDFile + '\'' +
+ ", lxcConf=" + Arrays.toString(lxcConf) +
+ ", links=" + Arrays.toString(links) +
+ ", portBindings=" + portBindings +
+ ", privileged=" + privileged +
+ ", publishAllPorts=" + publishAllPorts +
+ '}';
+ }
+
+ public class LxcConf {
+ @JsonProperty("Key")
+ public String key;
+
+ @JsonProperty("Value")
+ public String value;
+
+ public LxcConf(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public LxcConf() {
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public LxcConf setKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public LxcConf setValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ }
+}
diff --git a/src/main/java/com/kpelykh/docker/client/model/Info.java b/src/main/java/com/kpelykh/docker/client/model/Info.java
index 30667029..06c0ffe8 100644
--- a/src/main/java/com/kpelykh/docker/client/model/Info.java
+++ b/src/main/java/com/kpelykh/docker/client/model/Info.java
@@ -1,215 +1,215 @@
-package com.kpelykh.docker.client.model;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import java.util.List;
-
-/**
- *
- * @author Konstantin Pelykh (kpelykh@gmail.com)
- *
- */
-@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
-public class Info {
-
- @JsonProperty("Debug")
- private boolean debug;
-
- @JsonProperty("Containers")
- private int containers;
-
- @JsonProperty("Driver")
- private String driver;
-
- @JsonProperty("DriverStatus")
- private List