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
@@ -1,5 +1,7 @@
package com.github.dockerjava.api.command;

import java.util.List;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

Expand All @@ -20,6 +22,9 @@ public interface ExecCreateCmd extends SyncDockerCmd<ExecCreateCmdResponse> {
@CheckForNull
Boolean hasTtyEnabled();

@CheckForNull
List<String> getEnv();

@CheckForNull
String getUser();

Expand All @@ -37,6 +42,8 @@ public interface ExecCreateCmd extends SyncDockerCmd<ExecCreateCmdResponse> {

ExecCreateCmd withCmd(String... cmd);

ExecCreateCmd withEnv(List<String> env);

ExecCreateCmd withContainerId(@Nonnull String containerId);

ExecCreateCmd withTty(Boolean tty);
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/github/dockerjava/api/model/HostConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ public class HostConfig implements Serializable {
@JsonProperty("RestartPolicy")
private RestartPolicy restartPolicy;

/**
* @since {@link RemoteApiVersion#VERSION_1_24}
*/
@JsonProperty("StorageOpt")
private Map<String, String> storageOpt;

@JsonProperty("Ulimits")
private Ulimit[] ulimits;

Expand Down Expand Up @@ -845,6 +851,21 @@ public HostConfig withRestartPolicy(RestartPolicy restartPolicy) {
return this;
}

/**
* @see #storageOpt
*/
public Map<String, String> getStorageOpt() {
return storageOpt;
}

/**
* @see #storageOpt
*/
public HostConfig withStorageOpt(Map<String, String> storageOpt) {
this.storageOpt = storageOpt;
return this;
}

/**
* @see #securityOpts
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static com.google.common.base.Preconditions.checkNotNull;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down Expand Up @@ -41,6 +43,12 @@ public class ExecCreateCmdImpl extends AbstrDockerCmd<ExecCreateCmd, ExecCreateC
@JsonProperty("Cmd")
private String[] cmd;

/**
* @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_25}
*/
@JsonProperty("Env")
private List<String> env;

/**
* @since {@link com.github.dockerjava.core.RemoteApiVersion#VERSION_1_35}
*/
Expand Down Expand Up @@ -95,6 +103,12 @@ public ExecCreateCmd withCmd(String... cmd) {
return this;
}

@Override
public ExecCreateCmd withEnv(List<String> env) {
this.env = env;
return this;
}

@Override
public ExecCreateCmd withPrivileged(Boolean privileged) {
this.privileged = privileged;
Expand Down Expand Up @@ -132,6 +146,11 @@ public Boolean hasTtyEnabled() {
return tty;
}

@Override
public List<String> getEnv() {
return env;
}

@Override
public Boolean getPrivileged() {
return privileged;
Expand Down