Skip to content

Commit e0afdd3

Browse files
authored
[grid] Update container label compose.oneoff in Dynamic Grid (#16613)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 3abe4c7 commit e0afdd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java/src/org/openqa/selenium/grid/node/docker/DockerSessionFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ public DockerSessionFactory(
141141
this.predicate = Require.nonNull("Accepted capabilities predicate", predicate);
142142
this.hostConfig = Require.nonNull("Container host config", hostConfig);
143143
this.hostConfigKeys = Require.nonNull("Browser container host config keys", hostConfigKeys);
144-
this.composeLabels = Require.nonNull("Docker Compose labels", composeLabels);
144+
// Merge compose labels with oneoff=False to prevent triggering --exit-code-from dynamic grid
145+
Map<String, String> allLabels =
146+
new HashMap<>(Require.nonNull("Docker Compose labels", composeLabels));
147+
allLabels.put("com.docker.compose.oneoff", "False");
148+
this.composeLabels = Collections.unmodifiableMap(allLabels);
145149
}
146150

147151
@Override

0 commit comments

Comments
 (0)