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 @@ -3,10 +3,16 @@
import com.github.dockerjava.api.exception.ConflictException;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.Bind;
import com.github.dockerjava.api.model.Capability;
import com.github.dockerjava.api.model.ExposedPort;
import com.github.dockerjava.api.model.HealthCheck;
import com.github.dockerjava.api.model.HostConfig;
import com.github.dockerjava.api.model.Link;
import com.github.dockerjava.api.model.PortBinding;
import com.github.dockerjava.api.model.Ports;
import com.github.dockerjava.api.model.Volume;
import com.github.dockerjava.api.model.VolumesFrom;

import javax.annotation.CheckForNull;
import java.util.List;
Expand All @@ -29,6 +35,16 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
@CheckForNull
List<String> getAliases();

@Deprecated
@CheckForNull
Bind[] getBinds();

@Deprecated
CreateContainerCmd withBinds(Bind... binds);

@Deprecated
CreateContainerCmd withBinds(List<Bind> binds);

/**
* Add network-scoped alias for the container
*
Expand Down Expand Up @@ -111,6 +127,22 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons

CreateContainerCmd withIpv4Address(String ipv4Address);

@Deprecated
@CheckForNull
Link[] getLinks();

/**
* Add link to another container.
*/
@Deprecated
CreateContainerCmd withLinks(Link... links);

/**
* Add link to another container.
*/
@Deprecated
CreateContainerCmd withLinks(List<Link> links);

@CheckForNull
String getIpv6Address();

Expand All @@ -129,6 +161,49 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
@CheckForNull
String getName();

@Deprecated
@CheckForNull
String getNetworkMode();

/**
* Set the Network mode for the container
* <ul>
* <li>'bridge': creates a new network stack for the container on the docker bridge</li>
* <li>'none': no networking for this container</li>
* <li>'container:<name|id>': reuses another container network stack</li>
* <li>'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system
* services such as D-bus and is therefore considered insecure.</li>
* </ul>
*/
@Deprecated
CreateContainerCmd withNetworkMode(String networkMode);

@Deprecated
@CheckForNull
Ports getPortBindings();

/**
* Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
* <code>docker run</code> CLI command.
*/
@Deprecated
CreateContainerCmd withPortBindings(PortBinding... portBindings);

/**
* Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
* <code>docker run</code> CLI command.
*/
@Deprecated
CreateContainerCmd withPortBindings(List<PortBinding> portBindings);

/**
* Add the port bindings that are contained in the given {@link Ports} object.
*
* @see #withPortBindings(PortBinding...)
*/
@Deprecated
CreateContainerCmd withPortBindings(Ports portBindings);

CreateContainerCmd withName(String name);

@CheckForNull
Expand All @@ -138,6 +213,13 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons

CreateContainerCmd withPortSpecs(List<String> portSpecs);

@Deprecated
@CheckForNull
Boolean getPrivileged();

@Deprecated
CreateContainerCmd withPrivileged(Boolean privileged);

@CheckForNull
String getUser();

Expand All @@ -150,6 +232,16 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons

CreateContainerCmd withVolumes(List<Volume> volumes);

@Deprecated
@CheckForNull
VolumesFrom[] getVolumesFrom();

@Deprecated
CreateContainerCmd withVolumesFrom(VolumesFrom... volumesFrom);

@Deprecated
CreateContainerCmd withVolumesFrom(List<VolumesFrom> volumesFrom);

@CheckForNull
String getWorkingDir();

Expand Down Expand Up @@ -190,6 +282,66 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons

CreateContainerCmd withTty(Boolean tty);

@Deprecated
@CheckForNull
Boolean getPublishAllPorts();

@Deprecated
CreateContainerCmd withPublishAllPorts(Boolean publishAllPorts);

@CheckForNull
@Deprecated
String[] getExtraHosts();

/**
* Add hostnames to /etc/hosts in the container
*/
@Deprecated
CreateContainerCmd withExtraHosts(String... extraHosts);

/**
* Add hostnames to /etc/hosts in the container
*/
@Deprecated
CreateContainerCmd withExtraHosts(List<String> extraHosts);

@CheckForNull
@Deprecated
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.
*/
@Deprecated
CreateContainerCmd withCapAdd(Capability... capAdd);

/**
* 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.
*/
@Deprecated
CreateContainerCmd withCapAdd(List<Capability> capAdd);

@CheckForNull
@Deprecated
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.
*/
@Deprecated
CreateContainerCmd withCapDrop(Capability... capDrop);

/**
* 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.
*/
@Deprecated
CreateContainerCmd withCapDrop(List<Capability> capDrop);


@CheckForNull
List<String> getOnBuild();

Expand Down
Loading