Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,23 @@ public CreateContainerCmd withVolumes(Volume... volumes) {
return this;
}

public CreateContainerCmd withEnv(String... env) {
Preconditions.checkNotNull(env, "env was not specified");
this.containerCreateConfig.withEnv(env);
return this;
}

public CreateContainerCmd withHostName(String hostName) {
Preconditions.checkNotNull(hostName, "hostName was not specified");
this.containerCreateConfig.withHostName(hostName);
return this;
}
public CreateContainerCmd withVolumesFrom(String... volumesFrom) {
Preconditions.checkNotNull(volumesFrom, "volumes was not specified");
this.containerCreateConfig.withVolumesFrom(volumesFrom);
return this;
}

public CreateContainerCmd withEnv(String... env) {
Preconditions.checkNotNull(env, "env was not specified");
this.containerCreateConfig.withEnv(env);
return this;
}

public CreateContainerCmd withHostName(String hostName) {
Preconditions.checkNotNull(hostName, "hostName was not specified");
this.containerCreateConfig.withHostName(hostName);
return this;
}

public CreateContainerCmd withName(String name) {
Preconditions.checkNotNull(name, "name was not specified");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public class HostConfig {
private String dns;

@JsonProperty("VolumesFrom")
private String volumesFrom;
private String[] volumesFrom;

@JsonProperty("ContainerIDFile")
private String containerIDFile;
Expand Down Expand Up @@ -307,7 +307,7 @@ public String getDns() {
return dns;
}

public String getVolumesFrom() {
public String[] getVolumesFrom() {
return volumesFrom;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class CreateContainerConfig {
@JsonProperty("Dns") private String[] dns;
@JsonProperty("Image") private String image;
@JsonProperty("Volumes") private Volumes volumes = new Volumes();
@JsonProperty("VolumesFrom") private String volumesFrom = "";
@JsonProperty("VolumesFrom") private String[] volumesFrom = new String[]{};
@JsonProperty("WorkingDir") private String workingDir = "";
@JsonProperty("DisableNetwork") private boolean disableNetwork = false;
@JsonProperty("ExposedPorts") private ExposedPorts exposedPorts = new ExposedPorts();
Expand Down Expand Up @@ -237,11 +237,11 @@ public CreateContainerConfig withVolumes(Volume[] volumes) {
return this;
}

public String getVolumesFrom() {
public String[] getVolumesFrom() {
return volumesFrom;
}

public CreateContainerConfig withVolumesFrom(String volumesFrom) {
public CreateContainerConfig withVolumesFrom(String[] volumesFrom) {
this.volumesFrom = volumesFrom;
return this;
}
Expand Down