Skip to content

Commit 0362c12

Browse files
committed
Stop proxying hostconfig calls.
1 parent 3567fab commit 0362c12

File tree

3 files changed

+86
-737
lines changed

3 files changed

+86
-737
lines changed

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

Lines changed: 0 additions & 272 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,9 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
3030
@CheckForNull
3131
List<String> getAliases();
3232

33-
@CheckForNull
34-
Bind[] getBinds();
35-
36-
/**
37-
* @since 1.19
38-
*/
39-
@CheckForNull
40-
Integer getBlkioWeight();
41-
42-
@CheckForNull
43-
Capability[] getCapAdd();
44-
45-
@CheckForNull
46-
Capability[] getCapDrop();
47-
4833
@CheckForNull
4934
String[] getCmd();
5035

51-
/**
52-
* @since 1.19
53-
*/
54-
@CheckForNull
55-
Integer getCpuPeriod();
56-
57-
@CheckForNull
58-
String getCpusetCpus();
59-
60-
/**
61-
* @since 1.19
62-
*/
63-
@CheckForNull
64-
String getCpusetMems();
65-
66-
@CheckForNull
67-
Integer getCpuShares();
68-
69-
@CheckForNull
70-
Device[] getDevices();
71-
72-
@CheckForNull
73-
String[] getDns();
74-
75-
@CheckForNull
76-
String[] getDnsSearch();
77-
7836
@CheckForNull
7937
String getDomainName();
8038

@@ -90,9 +48,6 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
9048
@CheckForNull
9149
String getStopSignal();
9250

93-
@CheckForNull
94-
String[] getExtraHosts();
95-
9651
@CheckForNull
9752
String getHostName();
9853

@@ -108,54 +63,21 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
10863
@CheckForNull
10964
Map<String, String> getLabels();
11065

111-
@CheckForNull
112-
Link[] getLinks();
113-
114-
@CheckForNull
115-
LogConfig getLogConfig();
116-
117-
@CheckForNull
118-
LxcConf[] getLxcConf();
119-
12066
@CheckForNull
12167
String getMacAddress();
12268

123-
@CheckForNull
124-
Long getMemory();
125-
126-
@CheckForNull
127-
Long getMemorySwap();
128-
129-
@CheckForNull
130-
Integer getMemorySwappiness();
131-
13269
@CheckForNull
13370
String getName();
13471

135-
@CheckForNull
136-
String getNetworkMode();
137-
138-
@CheckForNull
139-
Ports getPortBindings();
140-
14172
@CheckForNull
14273
String[] getPortSpecs();
14374

144-
@CheckForNull
145-
RestartPolicy getRestartPolicy();
146-
147-
@CheckForNull
148-
Ulimit[] getUlimits();
149-
15075
@CheckForNull
15176
String getUser();
15277

15378
@CheckForNull
15479
Volume[] getVolumes();
15580

156-
@CheckForNull
157-
VolumesFrom[] getVolumesFrom();
158-
15981
@CheckForNull
16082
String getWorkingDir();
16183

@@ -171,36 +93,15 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
17193
@CheckForNull
17294
Boolean isNetworkDisabled();
17395

174-
/**
175-
* @since 1.19
176-
*/
177-
@CheckForNull
178-
Boolean getOomKillDisable();
179-
180-
@CheckForNull
181-
Boolean getPrivileged();
182-
183-
@CheckForNull
184-
Boolean getPublishAllPorts();
185-
186-
@CheckForNull
187-
Boolean getReadonlyRootfs();
188-
18996
@CheckForNull
19097
Boolean isStdInOnce();
19198

19299
@CheckForNull
193100
Boolean isStdinOpen();
194101

195-
@CheckForNull
196-
String getPidMode();
197-
198102
@CheckForNull
199103
HostConfig getHostConfig();
200104

201-
@CheckForNull
202-
String getCgroupParent();
203-
204105
@CheckForNull
205106
Boolean isTty();
206107

@@ -230,89 +131,10 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
230131

231132
CreateContainerCmd withAttachStdout(Boolean attachStdout);
232133

233-
CreateContainerCmd withBinds(Bind... binds);
234-
235-
CreateContainerCmd withBinds(List<Bind> binds);
236-
237-
/**
238-
* @since 1.19
239-
*/
240-
CreateContainerCmd withBlkioWeight(Integer blkioWeight);
241-
242-
/**
243-
* Add linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> to the container. For example:
244-
* adding {@link Capability#MKNOD} allows the container to create special files using the 'mknod' command.
245-
*/
246-
CreateContainerCmd withCapAdd(Capability... capAdd);
247-
248-
/**
249-
* Add linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> to the container. For example:
250-
* adding {@link Capability#MKNOD} allows the container to create special files using the 'mknod' command.
251-
*/
252-
CreateContainerCmd withCapAdd(List<Capability> capAdd);
253-
254-
/**
255-
* Drop linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> from the container. For example:
256-
* dropping {@link Capability#CHOWN} prevents the container from changing the owner of any files.
257-
*/
258-
CreateContainerCmd withCapDrop(Capability... capDrop);
259-
260-
/**
261-
* Drop linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> from the container. For example:
262-
* dropping {@link Capability#CHOWN} prevents the container from changing the owner of any files.
263-
*/
264-
CreateContainerCmd withCapDrop(List<Capability> capDrop);
265-
266134
CreateContainerCmd withCmd(String... cmd);
267135

268136
CreateContainerCmd withCmd(List<String> cmd);
269137

270-
CreateContainerCmd withContainerIDFile(String containerIDFile);
271-
272-
/**
273-
* @since 1.19
274-
*/
275-
CreateContainerCmd withCpuPeriod(Integer cpuPeriod);
276-
277-
CreateContainerCmd withCpusetCpus(String cpusetCpus);
278-
279-
/**
280-
* @since 1.19
281-
*/
282-
CreateContainerCmd withCpusetMems(String cpusetMems);
283-
284-
CreateContainerCmd withCpuShares(Integer cpuShares);
285-
286-
/**
287-
* Add host devices to the container
288-
*/
289-
CreateContainerCmd withDevices(Device... devices);
290-
291-
/**
292-
* Add host devices to the container
293-
*/
294-
CreateContainerCmd withDevices(List<Device> devices);
295-
296-
/**
297-
* Set custom DNS servers
298-
*/
299-
CreateContainerCmd withDns(String... dns);
300-
301-
/**
302-
* Set custom DNS servers
303-
*/
304-
CreateContainerCmd withDns(List<String> dns);
305-
306-
/**
307-
* Set custom DNS search domains
308-
*/
309-
CreateContainerCmd withDnsSearch(String... dnsSearch);
310-
311-
/**
312-
* Set custom DNS search domains
313-
*/
314-
CreateContainerCmd withDnsSearch(List<String> dnsSearch);
315-
316138
CreateContainerCmd withDomainName(String domainName);
317139

318140
CreateContainerCmd withEntrypoint(String... entrypoint);
@@ -329,16 +151,6 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
329151

330152
CreateContainerCmd withExposedPorts(List<ExposedPort> exposedPorts);
331153

332-
/**
333-
* Add hostnames to /etc/hosts in the container
334-
*/
335-
CreateContainerCmd withExtraHosts(String... extraHosts);
336-
337-
/**
338-
* Add hostnames to /etc/hosts in the container
339-
*/
340-
CreateContainerCmd withExtraHosts(List<String> extraHosts);
341-
342154
CreateContainerCmd withHostName(String hostName);
343155

344156
CreateContainerCmd withImage(String image);
@@ -349,114 +161,30 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
349161

350162
CreateContainerCmd withLabels(Map<String, String> labels);
351163

352-
/**
353-
* Add link to another container.
354-
*/
355-
CreateContainerCmd withLinks(Link... links);
356-
357-
/**
358-
* Add link to another container.
359-
*/
360-
CreateContainerCmd withLinks(List<Link> links);
361-
362-
CreateContainerCmd withLogConfig(LogConfig logConfig);
363-
364-
CreateContainerCmd withLxcConf(LxcConf... lxcConf);
365-
366-
CreateContainerCmd withLxcConf(List<LxcConf> lxcConf);
367-
368164
CreateContainerCmd withMacAddress(String macAddress);
369165

370-
CreateContainerCmd withMemory(Long memory);
371-
372-
CreateContainerCmd withMemorySwap(Long memorySwap);
373-
374-
CreateContainerCmd withMemorySwappiness(Integer memorySwappiness);
375-
376166
CreateContainerCmd withName(String name);
377167

378168
CreateContainerCmd withNetworkDisabled(Boolean disableNetwork);
379169

380-
/**
381-
* Set the Network mode for the container
382-
* <ul>
383-
* <li>'bridge': creates a new network stack for the container on the docker bridge</li>
384-
* <li>'none': no networking for this container</li>
385-
* <li>'container:<name|id>': reuses another container network stack</li>
386-
* <li>'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system
387-
* services such as D-bus and is therefore considered insecure.</li>
388-
* </ul>
389-
*/
390-
CreateContainerCmd withNetworkMode(String networkMode);
391-
392-
/**
393-
* @since 1.19
394-
*/
395-
CreateContainerCmd withOomKillDisable(Boolean oomKillDisable);
396-
397-
/**
398-
* Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
399-
* <code>docker run</code> CLI command.
400-
*/
401-
CreateContainerCmd withPortBindings(PortBinding... portBindings);
402-
403-
/**
404-
* Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
405-
* <code>docker run</code> CLI command.
406-
*/
407-
CreateContainerCmd withPortBindings(List<PortBinding> portBindings);
408-
409-
/**
410-
* Add the port bindings that are contained in the given {@link Ports} object.
411-
*
412-
* @see #withPortBindings(PortBinding...)
413-
*/
414-
CreateContainerCmd withPortBindings(Ports portBindings);
415-
416170
CreateContainerCmd withPortSpecs(String... portSpecs);
417171

418172
CreateContainerCmd withPortSpecs(List<String> portSpecs);
419173

420-
CreateContainerCmd withPrivileged(Boolean privileged);
421-
422-
CreateContainerCmd withPublishAllPorts(Boolean publishAllPorts);
423-
424-
CreateContainerCmd withReadonlyRootfs(Boolean readonlyRootfs);
425-
426-
/**
427-
* Set custom {@link RestartPolicy} for the container. Defaults to {@link RestartPolicy#noRestart()}
428-
*/
429-
CreateContainerCmd withRestartPolicy(RestartPolicy restartPolicy);
430-
431174
CreateContainerCmd withStdInOnce(Boolean stdInOnce);
432175

433176
CreateContainerCmd withStdinOpen(Boolean stdinOpen);
434177

435178
CreateContainerCmd withTty(Boolean tty);
436179

437-
CreateContainerCmd withUlimits(Ulimit... ulimits);
438-
439-
CreateContainerCmd withUlimits(List<Ulimit> ulimits);
440-
441180
CreateContainerCmd withUser(String user);
442181

443182
CreateContainerCmd withVolumes(Volume... volumes);
444183

445184
CreateContainerCmd withVolumes(List<Volume> volumes);
446185

447-
CreateContainerCmd withVolumesFrom(VolumesFrom... volumesFrom);
448-
449-
CreateContainerCmd withVolumesFrom(List<VolumesFrom> volumesFrom);
450-
451186
CreateContainerCmd withWorkingDir(String workingDir);
452187

453-
CreateContainerCmd withCgroupParent(String cgroupParent);
454-
455-
/**
456-
* Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container
457-
*/
458-
CreateContainerCmd withPidMode(String pidMode);
459-
460188
CreateContainerCmd withHostConfig(HostConfig hostConfig);
461189

462190
/**

0 commit comments

Comments
 (0)