1212import com .github .dockerjava .api .model .RestartPolicy ;
1313
1414/**
15- * Start a container
15+ * Start a container.
16+ *
17+ * TODO: Almost all methods are deprecated as they have corresponding siblings in {@link CreateContainerCmd} now.
1618 */
1719public interface StartContainerCmd extends DockerCmd <Void > {
1820
@@ -48,13 +50,16 @@ public interface StartContainerCmd extends DockerCmd<Void> {
4850
4951 public Capability [] getCapDrop ();
5052
53+ @ Deprecated
5154 public StartContainerCmd withBinds (Bind ... binds );
5255
5356 /**
5457 * Add link to another container.
5558 */
59+ @ Deprecated
5660 public StartContainerCmd withLinks (Link ... links );
5761
62+ @ Deprecated
5863 public StartContainerCmd withLxcConf (LxcConf ... lxcConf );
5964
6065 /**
@@ -63,31 +68,39 @@ public interface StartContainerCmd extends DockerCmd<Void> {
6368 *
6469 * @see #withPortBindings(PortBinding...)
6570 */
71+ @ Deprecated
6672 public StartContainerCmd withPortBindings (Ports portBindings );
6773
6874 /**
6975 * Add one or more {@link PortBinding}s.
7076 * This corresponds to the <code>--publish</code> (<code>-p</code>)
7177 * option of the <code>docker run</code> CLI command.
7278 */
79+ @ Deprecated
7380 public StartContainerCmd withPortBindings (PortBinding ... portBindings );
7481
82+ @ Deprecated
7583 public StartContainerCmd withPrivileged (Boolean privileged );
7684
85+ @ Deprecated
7786 public StartContainerCmd withPublishAllPorts (Boolean publishAllPorts );
7887
7988 /**
8089 * Set custom DNS servers
8190 */
91+ @ Deprecated
8292 public StartContainerCmd withDns (String ... dns );
8393
8494 /**
8595 * Set custom DNS search domains
8696 */
97+ @ Deprecated
8798 public StartContainerCmd withDnsSearch (String ... dnsSearch );
8899
100+ @ Deprecated
89101 public StartContainerCmd withVolumesFrom (String volumesFrom );
90102
103+ @ Deprecated
91104 public StartContainerCmd withContainerId (String containerId );
92105
93106 /**
@@ -102,22 +115,26 @@ public interface StartContainerCmd extends DockerCmd<Void> {
102115 * as D-bus and is therefore considered insecure.</li>
103116 * </ul>
104117 */
118+ @ Deprecated
105119 public StartContainerCmd withNetworkMode (String networkMode );
106120
107121 /**
108122 * Add host devices to the container
109123 */
124+ @ Deprecated
110125 public StartContainerCmd withDevices (Device ... devices );
111126
112127 /**
113128 * Add hostnames to /etc/hosts in the container
114129 */
130+ @ Deprecated
115131 public StartContainerCmd withExtraHosts (String ... extraHosts );
116132
117133 /**
118134 * Set custom {@link RestartPolicy} for the container. Defaults to
119135 * {@link RestartPolicy#noRestart()}
120136 */
137+ @ Deprecated
121138 public StartContainerCmd withRestartPolicy (RestartPolicy restartPolicy );
122139
123140 /**
@@ -126,6 +143,7 @@ public interface StartContainerCmd extends DockerCmd<Void> {
126143 * capability</a> to the container. For example: adding {@link Capability#MKNOD}
127144 * allows the container to create special files using the 'mknod' command.
128145 */
146+ @ Deprecated
129147 public StartContainerCmd withCapAdd (Capability ... capAdd );
130148
131149 /**
@@ -134,6 +152,7 @@ public interface StartContainerCmd extends DockerCmd<Void> {
134152 * capability</a> from the container. For example: dropping {@link Capability#CHOWN}
135153 * prevents the container from changing the owner of any files.
136154 */
155+ @ Deprecated
137156 public StartContainerCmd withCapDrop (Capability ... capDrop );
138157
139158 /**
0 commit comments