docker_image - Produce Docker images
docker_image
element produces a Docker image based on its build
dependencies.
As the element creates a layer for each of its dependencies, the docker_image
element must have at least one build dependency. The element must not have
any run-time dependencies.
This plugin provides the following config
options to modify
container-runtime configurations.
- The default configuration is as such:
# Run-time configurations for the container spawned form the image artifact. config: # A list of ports to expose from a container running this image, # Its values can be in the format of: # - "port/tcp" # - "port/udp" # - "port" # By default we expose no ports exposed-ports: [] # List of environment variables for the container # in the format of VARNAME="var value" env: [] # A list of arguments to use as the command to execute # when the container starts. entry-point: [] # Default arguments to the entry point of the container. # If an entry-point value is not specified, then the first entry # of the list should be interpreted as the executable to run. cmd: [] # A list of directories which should be created as data # volumes in a container running this image volumes: [] # Directory to set the current working directory of the # entry point process in the container. # By default, set to root. working-dir: '/' # Creation timestamp of image. # The options are: # - now : use the current time stamp on image # - deterministic : use BuildStream's arbitrary timestamp to ensure images are built # deterministically # - any ISO-8601 formatted combined date and time. (e.g. 2015-10-31T22:22:54Z) timestamp: now # A dictionary for the test to perform to determine whether the # container is healthy. health-check: # The test to perform to check that the container is healthy. # The options are: # - ["NONE"] : disable health-check # - ["CMD", arg1, arg2, ...] : exec arguments directly # - ["CMD-SHELL", command] : run command with system's default shell # The test command should exit with a status of 0 if the container # is healthy, or with 1 if it is unhealthy. tests: ["NONE"] # Number of nanoseconds to wait between probe attempts. interval: 0 # Number of nanoseconds to wait before considering the check to have hung. timeout: 0 # Number of consecutive failures needed to consider a container as unhealthy. retries: 0 # A list of names that reference the created image. # Must follow docker repository naming conventions. image-names: []