GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Init attribute in ContainerSpec (#1927) · rake5k/docker-java@3ea46f9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • docker-java-api/src/main/java/com/github/dockerjava/api/model
    • ContainerSpec.java
  • docker-java/src/test/java/com/github/dockerjava/cmd/swarm
    • UpdateSwarmServiceIT.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docker-java-api/src/main/java/com/github/dockerjava/api/model/ContainerSpec.java‎

Copy file name to clipboardExpand all lines: docker-java-api/src/main/java/com/github/dockerjava/api/model/ContainerSpec.java
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ public class ContainerSpec extends DockerObject implements Serializable {
161161
@JsonProperty("Configs")
162162
private List<ContainerSpecConfig> configs;
163163

164+
/**
165+
* @since 1.38
166+
* Run an init inside the container that forwards signals and reaps processes.
167+
* This field is omitted if empty, and the default (as configured on the daemon) is used.
168+
*/
169+
@JsonProperty("Init")
170+
private Boolean init;
171+
164172
/**
165173
* @see #image
166174
*/
@@ -435,4 +443,13 @@ public ContainerSpec withConfigs(List<ContainerSpecConfig> configs) {
435443
this.configs = configs;
436444
return this;
437445
}
446+
447+
public Boolean getInit() {
448+
return init;
449+
}
450+
451+
public ContainerSpec withInit(Boolean init) {
452+
this.init = init;
453+
return this;
454+
}
438455
}
Collapse file

‎docker-java/src/test/java/com/github/dockerjava/cmd/swarm/UpdateSwarmServiceIT.java‎

Copy file name to clipboardExpand all lines: docker-java/src/test/java/com/github/dockerjava/cmd/swarm/UpdateSwarmServiceIT.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void testUpdateServiceReplicate() throws Exception {
2727
String networkId = dockerClient.createNetworkCmd().withName("networkname").withDriver("overlay")
2828
.withIpam(new Network.Ipam().withDriver("default")).exec().getId();
2929
TaskSpec taskSpec = new TaskSpec().withContainerSpec(
30-
new ContainerSpec().withImage("busybox").withArgs(Arrays.asList("sleep", "3600")));
30+
new ContainerSpec().withImage("busybox").withArgs(Arrays.asList("sleep", "3600")).withInit(true));
3131
ServiceSpec serviceSpec = new ServiceSpec()
3232
.withMode(new ServiceModeConfig().withReplicated(new ServiceReplicatedModeOptions().withReplicas(1)))
3333
.withTaskTemplate(taskSpec)

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.