Skip to content

Commit 0f4647d

Browse files
rnacherKostyaSha
authored andcommitted
Add AutoRemove to HostConfig (docker-java#1050)
* Add AutoRemove to HostConfig * fix check-style issues * remove getAutoRemove method. * Removed methods to set AutoRemove in CreateContainerCmd * reverted changes on CreateContainerCmdImpl * removed extra line
1 parent cfe8020 commit 0f4647d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main/java/com/github/dockerjava/api/model/HostConfig.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ public class HostConfig implements Serializable {
141141
@JsonProperty("OomKillDisable")
142142
private Boolean oomKillDisable;
143143

144+
/**
145+
* @since {@link RemoteApiVersion#VERSION_1_25}
146+
*/
147+
@JsonProperty("AutoRemove")
148+
private Boolean autoRemove;
149+
144150
/**
145151
* @since {@link RemoteApiVersion#VERSION_1_22}
146152
*/
@@ -400,6 +406,13 @@ public Integer getMemorySwappiness() {
400406
public Boolean getOomKillDisable() {
401407
return oomKillDisable;
402408
}
409+
/**
410+
* @see #autoRemove
411+
*/
412+
@CheckForNull
413+
public Boolean getAutoRemove() {
414+
return autoRemove;
415+
}
403416

404417
/**
405418
* @see #securityOpts
@@ -712,6 +725,13 @@ public HostConfig withOomKillDisable(Boolean oomKillDisable) {
712725
this.oomKillDisable = oomKillDisable;
713726
return this;
714727
}
728+
/**
729+
* @see #autoRemove
730+
*/
731+
public HostConfig withAutoRemove(Boolean autoRemove) {
732+
this.autoRemove = autoRemove;
733+
return this;
734+
}
715735

716736
/**
717737
* @see #oomScoreAdj

0 commit comments

Comments
 (0)