File tree Expand file tree Collapse file tree 4 files changed +7
-0
lines changed
Expand file tree Collapse file tree 4 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const Env = z.object({
2727 RUNNER_HEARTBEAT_INTERVAL_SECONDS : z . coerce . number ( ) . optional ( ) ,
2828 RUNNER_SNAPSHOT_POLL_INTERVAL_SECONDS : z . coerce . number ( ) . optional ( ) ,
2929 RUNNER_ADDITIONAL_ENV_VARS : AdditionalEnvVars , // optional (csv)
30+ RUNNER_DOCKER_AUTOREMOVE : BoolEnv . default ( true ) ,
3031
3132 // Dequeue settings (provider mode)
3233 TRIGGER_DEQUEUE_ENABLED : BoolEnv . default ( "true" ) ,
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ class ManagedSupervisor {
6666 heartbeatIntervalSeconds : env . RUNNER_HEARTBEAT_INTERVAL_SECONDS ,
6767 snapshotPollIntervalSeconds : env . RUNNER_SNAPSHOT_POLL_INTERVAL_SECONDS ,
6868 additionalEnvVars : env . RUNNER_ADDITIONAL_ENV_VARS ,
69+ dockerAutoremove : env . RUNNER_DOCKER_AUTOREMOVE ,
6970 } satisfies WorkloadManagerOptions ;
7071
7172 if ( this . isKubernetes ) {
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ export class DockerWorkloadManager implements WorkloadManager {
4343 `--name=${ runnerId } ` ,
4444 ] ;
4545
46+ if ( this . opts . dockerAutoremove ) {
47+ runArgs . push ( "--rm" ) ;
48+ }
49+
4650 if ( this . opts . warmStartUrl ) {
4751 runArgs . push ( `--env=TRIGGER_WARM_START_URL=${ this . opts . warmStartUrl } ` ) ;
4852 }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export interface WorkloadManagerOptions {
1010 heartbeatIntervalSeconds ?: number ;
1111 snapshotPollIntervalSeconds ?: number ;
1212 additionalEnvVars ?: Record < string , string > ;
13+ dockerAutoremove ?: boolean ;
1314}
1415
1516export interface WorkloadManager {
You can’t perform that action at this time.
0 commit comments