Skip to content

Commit 2eb297e

Browse files
author
Marcus Linke
committed
Renamed method
1 parent 4f094c1 commit 2eb297e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,12 @@ public static interface Exec extends DockerCmdSyncExec<CreateContainerCmd, Creat
296296

297297
public CreateContainerCmd withContainerIDFile(String containerIDFile);
298298

299-
public CreateContainerCmd withPid(String pidMode);
299+
/**
300+
* Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace
301+
* inside the container
302+
*/
303+
public CreateContainerCmd withPidMode(String pidMode);
304+
300305
/**
301306
* @return
302307
*/

src/main/java/com/github/dockerjava/core/command/CreateContainerCmdImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ public CreateContainerCmdImpl withWorkingDir(String workingDir) {
739739
}
740740

741741
@Override
742-
public CreateContainerCmd withPid(String pidMode) {
742+
public CreateContainerCmd withPidMode(String pidMode) {
743743
checkNotNull(pidMode, "pidMode was not specified");
744744
this.hostConfig.setPidMode(pidMode);
745745
return this;

src/test/java/com/github/dockerjava/core/command/CreateContainerCmdImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public void createContainerWithRestartPolicy() throws DockerException {
457457
public void createContainerWithPidMode() throws DockerException {
458458

459459
CreateContainerResponse container = dockerClient.createContainerCmd("busybox").withCmd("true")
460-
.withPid("host").exec();
460+
.withPidMode("host").exec();
461461

462462
LOG.info("Created container {}", container.toString());
463463

0 commit comments

Comments
 (0)