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 @@ -179,6 +179,9 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
@CheckForNull
String getPidMode();

@CheckForNull
String getCgroupParent();

@CheckForNull
Boolean isTty();

Expand Down Expand Up @@ -402,6 +405,8 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons

CreateContainerCmd withWorkingDir(String workingDir);

CreateContainerCmd withCgroupParent(String cgroupParent);

/**
* Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ public String getPidMode() {
return hostConfig.getPidMode();
}

@Override
public String getCgroupParent() {
return hostConfig.getCgroupParent();
}

@Override
public String toString() {
return new ToStringBuilder(this).append("create container ").append(name != null ? "name=" + name + " " : "")
Expand Down Expand Up @@ -871,6 +876,13 @@ public CreateContainerCmd withWorkingDir(String workingDir) {
return this;
}

@Override
public CreateContainerCmd withCgroupParent(final String cgroupParent) {
checkNotNull(cgroupParent, "cgroupParent was not specified");
this.hostConfig.withCgroupParent(cgroupParent);
return this;
}

@Override
public CreateContainerCmd withPidMode(String pidMode) {
checkNotNull(pidMode, "pidMode was not specified");
Expand Down