X Tutup
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 @@ -2,9 +2,9 @@

import com.github.dockerjava.api.ConflictException;
import com.github.dockerjava.api.NotFoundException;
import com.github.dockerjava.api.model.Capability;
import com.github.dockerjava.api.model.ExposedPort;
import com.github.dockerjava.api.model.HostConfig;
import com.github.dockerjava.api.model.Links;
import com.github.dockerjava.api.model.Volume;

public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{
Expand Down Expand Up @@ -101,6 +101,25 @@ public interface CreateContainerCmd extends DockerCmd<CreateContainerResponse>{

public CreateContainerCmd withHostConfig(HostConfig hostConfig);

public Capability[] getCapAdd();

/**
* Add linux <a
* href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel
* capability</a> to the container. For example: adding {@link Capability#MKNOD}
* allows the container to create special files using the 'mknod' command.
*/
public CreateContainerCmd withCapAdd(Capability... capAdd);

public Capability[] getCapDrop();

/**
* Drop linux <a
* href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel
* capability</a> from the container. For example: dropping {@link Capability#CHOWN}
* prevents the container from changing the owner of any files.
*/
public CreateContainerCmd withCapDrop(Capability... capDrop);

/**
* @throws NotFoundException No such container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.dockerjava.api.NotFoundException;
import com.github.dockerjava.api.NotModifiedException;
import com.github.dockerjava.api.model.Bind;
import com.github.dockerjava.api.model.Capability;
import com.github.dockerjava.api.model.Device;
import com.github.dockerjava.api.model.Link;
import com.github.dockerjava.api.model.LxcConf;
Expand Down Expand Up @@ -41,9 +42,9 @@ public interface StartContainerCmd extends DockerCmd<Void> {

public RestartPolicy getRestartPolicy();

public String[] getCapAdd();
public Capability[] getCapAdd();

public String[] getCapDrop();
public Capability[] getCapDrop();

public StartContainerCmd withBinds(Bind... binds);

Expand Down Expand Up @@ -115,18 +116,18 @@ public interface StartContainerCmd extends DockerCmd<Void> {
/**
* Add linux <a
* href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel
* capability</a> to the container. For example: adding capability "MKNOD"
* capability</a> to the container. For example: adding {@link Capability#MKNOD}
* allows the container to create special files using the 'mknod' command.
*/
public StartContainerCmd withCapAdd(String... capAdd);
public StartContainerCmd withCapAdd(Capability... capAdd);

/**
* Drop linux <a
* href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel
* capability</a> from the container. For example: dropping capability
* "CHOWN" prevents the container from changing the owner of any files.
* capability</a> from the container. For example: dropping {@link Capability#CHOWN}
* prevents the container from changing the owner of any files.
*/
public StartContainerCmd withCapDrop(String... capDrop);
public StartContainerCmd withCapDrop(Capability... capDrop);

/**
* @throws NotFoundException
Expand Down
Loading
X Tutup