Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b05d493

Browse filesBrowse files
authored
Merge pull request #1225 from bsideup/revert_breaking_change_in_create_container_cmd
Revert breaking binary change of `CreateContainerCmd`
2 parents 076fd41 + 62beea4 commit b05d493
Copy full SHA for b05d493

File tree

Expand file treeCollapse file tree

3 files changed

+473
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+473
-0
lines changed

‎pom.xml

Copy file name to clipboardExpand all lines: pom.xml
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,32 @@
450450
</instructions>
451451
</configuration>
452452
</plugin>
453+
454+
<plugin>
455+
<!-- use with "mvn -DskipTests clean package japicmp:cmp" -->
456+
<groupId>com.github.siom79.japicmp</groupId>
457+
<artifactId>japicmp-maven-plugin</artifactId>
458+
<version>0.14.1</version>
459+
<configuration>
460+
<oldVersion>
461+
<dependency>
462+
<groupId>com.github.docker-java</groupId>
463+
<artifactId>docker-java</artifactId>
464+
<version>3.1.0-rc-4</version>
465+
<type>jar</type>
466+
</dependency>
467+
</oldVersion>
468+
<newVersion>
469+
<file>
470+
<path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
471+
</file>
472+
</newVersion>
473+
<parameter>
474+
<accessModifier>public</accessModifier>
475+
<onlyBinaryIncompatible>true</onlyBinaryIncompatible>
476+
</parameter>
477+
</configuration>
478+
</plugin>
453479
</plugins>
454480
</build>
455481

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

Copy file name to clipboardExpand all lines: src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java
+159Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
import com.github.dockerjava.api.model.AuthConfig;
66
import com.github.dockerjava.api.model.Bind;
77
import com.github.dockerjava.api.model.Capability;
8+
import com.github.dockerjava.api.model.Device;
89
import com.github.dockerjava.api.model.ExposedPort;
910
import com.github.dockerjava.api.model.HealthCheck;
1011
import com.github.dockerjava.api.model.HostConfig;
1112
import com.github.dockerjava.api.model.Link;
13+
import com.github.dockerjava.api.model.LogConfig;
14+
import com.github.dockerjava.api.model.LxcConf;
1215
import com.github.dockerjava.api.model.PortBinding;
1316
import com.github.dockerjava.api.model.Ports;
17+
import com.github.dockerjava.api.model.RestartPolicy;
18+
import com.github.dockerjava.api.model.Ulimit;
1419
import com.github.dockerjava.api.model.Volume;
1520
import com.github.dockerjava.api.model.VolumesFrom;
1621

@@ -366,6 +371,160 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
366371

367372
CreateContainerCmd withHostConfig(HostConfig hostConfig);
368373

374+
// The following methods are deprecated and should be set on {@link #getHostConfig()} instead.
375+
// TODO remove in the next big release
376+
377+
@Deprecated
378+
@CheckForNull
379+
Integer getBlkioWeight();
380+
381+
@CheckForNull
382+
@Deprecated
383+
String getCgroupParent();
384+
385+
@Deprecated
386+
@CheckForNull
387+
Integer getCpuPeriod();
388+
389+
@Deprecated
390+
@CheckForNull
391+
Integer getCpuShares();
392+
393+
@Deprecated
394+
@CheckForNull
395+
String getCpusetCpus();
396+
397+
@Deprecated
398+
@CheckForNull
399+
String getCpusetMems();
400+
401+
@Deprecated
402+
@CheckForNull
403+
Device[] getDevices();
404+
405+
@Deprecated
406+
@CheckForNull
407+
String[] getDns();
408+
409+
@Deprecated
410+
@CheckForNull
411+
String[] getDnsSearch();
412+
413+
@Deprecated
414+
@CheckForNull
415+
LogConfig getLogConfig();
416+
417+
@Deprecated
418+
@CheckForNull
419+
LxcConf[] getLxcConf();
420+
421+
@Deprecated
422+
@CheckForNull
423+
Boolean getOomKillDisable();
424+
425+
@Deprecated
426+
@CheckForNull
427+
String getPidMode();
428+
429+
@Deprecated
430+
@CheckForNull
431+
Boolean getReadonlyRootfs();
432+
433+
@Deprecated
434+
@CheckForNull
435+
RestartPolicy getRestartPolicy();
436+
437+
@Deprecated
438+
@CheckForNull
439+
Ulimit[] getUlimits();
440+
441+
@Deprecated
442+
CreateContainerCmd withBlkioWeight(Integer blkioWeight);
443+
444+
@Deprecated
445+
CreateContainerCmd withCgroupParent(String cgroupParent);
446+
447+
@Deprecated
448+
CreateContainerCmd withContainerIDFile(String containerIDFile);
449+
450+
@Deprecated
451+
CreateContainerCmd withCpuPeriod(Integer cpuPeriod);
452+
453+
@Deprecated
454+
CreateContainerCmd withCpuShares(Integer cpuShares);
455+
456+
@Deprecated
457+
CreateContainerCmd withCpusetCpus(String cpusetCpus);
458+
459+
@Deprecated
460+
CreateContainerCmd withCpusetMems(String cpusetMems);
461+
462+
@Deprecated
463+
CreateContainerCmd withDevices(Device... devices);
464+
465+
/**
466+
* Add host devices to the container
467+
*/
468+
@Deprecated
469+
CreateContainerCmd withDevices(List<Device> devices);
470+
471+
/**
472+
* Set custom DNS servers
473+
*/
474+
@Deprecated
475+
CreateContainerCmd withDns(String... dns);
476+
477+
/**
478+
* Set custom DNS servers
479+
*/
480+
@Deprecated
481+
CreateContainerCmd withDns(List<String> dns);
482+
483+
/**
484+
* Set custom DNS search domains
485+
*/
486+
@Deprecated
487+
CreateContainerCmd withDnsSearch(String... dnsSearch);
488+
489+
/**
490+
* Set custom DNS search domains
491+
*/
492+
@Deprecated
493+
CreateContainerCmd withDnsSearch(List<String> dnsSearch);
494+
495+
@Deprecated
496+
CreateContainerCmd withLogConfig(LogConfig logConfig);
497+
498+
@Deprecated
499+
CreateContainerCmd withLxcConf(LxcConf... lxcConf);
500+
501+
@Deprecated
502+
CreateContainerCmd withLxcConf(List<LxcConf> lxcConf);
503+
504+
@Deprecated
505+
CreateContainerCmd withOomKillDisable(Boolean oomKillDisable);
506+
507+
/**
508+
* Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container
509+
*/
510+
@Deprecated
511+
CreateContainerCmd withPidMode(String pidMode);
512+
513+
@Deprecated
514+
CreateContainerCmd withReadonlyRootfs(Boolean readonlyRootfs);
515+
516+
/**
517+
* Set custom {@link RestartPolicy} for the container. Defaults to {@link RestartPolicy#noRestart()}
518+
*/
519+
@Deprecated
520+
CreateContainerCmd withRestartPolicy(RestartPolicy restartPolicy);
521+
522+
@Deprecated
523+
CreateContainerCmd withUlimits(Ulimit... ulimits);
524+
525+
@Deprecated
526+
CreateContainerCmd withUlimits(List<Ulimit> ulimits);
527+
369528
/**
370529
* @throws NotFoundException No such container
371530
* @throws ConflictException Named container already exists

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.