Skip to content
Closed
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 @@ -26,6 +26,9 @@ public interface ExecCreateCmd extends SyncDockerCmd<ExecCreateCmdResponse> {
@CheckForNull
Boolean getPrivileged();

@CheckForNull
String[] getEnv();

ExecCreateCmd withAttachStderr(Boolean attachStderr);

ExecCreateCmd withAttachStdin(Boolean attachStdin);
Expand All @@ -42,6 +45,8 @@ public interface ExecCreateCmd extends SyncDockerCmd<ExecCreateCmdResponse> {

ExecCreateCmd withPrivileged(Boolean isPrivileged);

ExecCreateCmd withEnv(String... env);

interface Exec extends DockerCmdSyncExec<ExecCreateCmd, ExecCreateCmdResponse> {
}

Expand Down
16 changes: 16 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 @@ -170,6 +170,9 @@ public class HostConfig implements Serializable {
@JsonProperty("PidMode")
private String pidMode;

@JsonProperty("IpcMode")
private String ipcMode;

/**
* @since {@link RemoteApiVersion#VERSION_1_20}
*/
Expand Down Expand Up @@ -301,6 +304,11 @@ public String getPidMode() {
return pidMode;
}

@CheckForNull
public String getIpcMode() {
return ipcMode;
}

/**
* @see #blkioDeviceReadBps
*/
Expand Down Expand Up @@ -705,6 +713,14 @@ public HostConfig withPidMode(String pidMode) {
return this;
}

/**
* @see #ipcMode
*/
public HostConfig withIpcMode(String ipcMode) {
this.ipcMode = ipcMode;
return this;
}

/**
* @see #portBindings
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public class ExecCreateCmdImpl extends AbstrDockerCmd<ExecCreateCmd, ExecCreateC
@JsonProperty("Cmd")
private String[] cmd;

/**
* @since {@link RemoteApiVersion#VERSION_1_25}
*/
@JsonProperty("Env")
private String[] env;

public ExecCreateCmdImpl(ExecCreateCmd.Exec exec, String containerId) {
super(exec);
withContainerId(containerId);
Expand Down Expand Up @@ -95,6 +101,12 @@ public ExecCreateCmd withPrivileged(Boolean privileged) {
return this;
}

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

@Override
public String getContainerId() {
return containerId;
Expand Down Expand Up @@ -130,6 +142,11 @@ public String getUser() {
return user;
}

@Override
public String[] getEnv() {
return env;
}

/**
* @throws NotFoundException
* No such container
Expand Down