Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ The `DOCKER_COMPUTE_ENVIRONMENTS` environment variable should be a JSON array of
[
{
"socketPath": "/var/run/docker.sock",
"scanImages": true,
"imageRetentionDays": 7,
"imageCleanupInterval": 86400,
"resources": [
Expand Down Expand Up @@ -194,6 +195,7 @@ The `DOCKER_COMPUTE_ENVIRONMENTS` environment variable should be a JSON array of
#### Configuration Options

- **socketPath**: Path to the Docker socket (e.g., docker.sock).
- **scanImages**: If the docker images should be scan for vulnerabilities using trivy. If yes and critical vulnerabilities are found, then C2D job is refused
- **imageRetentionDays** - how long docker images are kept, in days. Default: 7
- **imageCleanupInterval** - how often to run cleanup for docker images, in seconds. Min: 3600 (1hour), Default: 86400 (24 hours)
- **paymentClaimInterval** - how often to run payment claiming, in seconds. Default: 3600 (1 hour)
Expand Down
6 changes: 6 additions & 0 deletions src/@types/C2D/C2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ export interface C2DDockerConfig {
imageRetentionDays?: number // Default: 7 days
imageCleanupInterval?: number // Default: 86400 seconds (24 hours)
paymentClaimInterval?: number // Default: 3600 seconds (1 hours)
scanImages?: boolean
scanImageDBUpdateInterval?: number // Default: 12 hours
}

export type ComputeResultType =
Expand Down Expand Up @@ -299,6 +301,8 @@ export enum C2DStatusNumber {
// eslint-disable-next-line no-unused-vars
BuildImageFailed = 13,
// eslint-disable-next-line no-unused-vars
VulnerableImage = 14,
// eslint-disable-next-line no-unused-vars
ConfiguringVolumes = 20,
// eslint-disable-next-line no-unused-vars
VolumeCreationFailed = 21,
Expand Down Expand Up @@ -347,6 +351,8 @@ export enum C2DStatusText {
// eslint-disable-next-line no-unused-vars
BuildImageFailed = 'Building algorithm image failed',
// eslint-disable-next-line no-unused-vars
VulnerableImage = 'Image has vulnerabilities',
// eslint-disable-next-line no-unused-vars
ConfiguringVolumes = 'Configuring volumes',
// eslint-disable-next-line no-unused-vars
VolumeCreationFailed = 'Volume creation failed',
Expand Down
Loading
Loading