Skip to content

Latest commit

 

History

History
43 lines (41 loc) · 2.31 KB

docker_image.md

File metadata and controls

43 lines (41 loc) · 2.31 KB

Job Type: Docker Image

You can also specify an already build image and run it as a job.

{
    "version": 1,
    "jobs": [{
        "type": "docker-image",
        "name": "test",
        "image": "alpine:latest",
        "command": ["echo", "hello world"]
        "resources": { "limits": { "cpu": 1, "memory": 1024 } },
        "build_context": "...",
        "cache": { ... },
        "timeout": 3600,
        "depends_on": ["other_job_name"],
        "deployments": [ ... ],
        "environment": { ... },
        "security_context": { ... },
        "repository": { ... },
        "registries": [],
        "run": true
    }]
}
Name Required Type Default Description
type true string Has to be "docker-image" to run a single Docker container
name true string Name of the job
image true string Image to use, i.e. alpine:latest
command false string The command in exec form
resources true Resource Configuration Specify the required resources for your job
build_context false string Specify the docker build context. If not set the directory containing the infrabox.json file will be used.
cache false Cache Configuration {} Configure the caching behavior
timeout false integer 3600 Timeout in seconds after which the job should be killed. Timeout starts when the job is set to running
depends_on false Dependency Configuration [] Jobs may have dependencies. You can list all jobs which should finish before the current job may be executed.
environment false Environment Variables {} Can be used to set environment variables for the job.
deployments false Deployment Configuration [] Push your images to a registry
security_context false Security Context [] Configure security related options
repository false Repository Configuration {} Configure git repository options
registries false Source Registry Configuration [] Configure the source registries
run false boolean true Set to false if you have a deployment configured and only want to push an image but not execute it