Stages
This property will allow users to define a list of Containerfile stages each with their own modules. Stages can be used to compile programs, perform parallel operations, and copy the results into the final image without contaminating the final image.
Module Support
Currently the only modules that work out-of-the-box are copy
, script
, files
, and containerfile
. Other modules are dependent on the programs installed on the image. In order to better support some of our essential modules, a setup script is ran at the start of each stage that is not scratch
. This script will install curl
, wget
, bash
, and grep
and use the package manager for the detected distributions.
At this time, the following distributions are supported:
- Debian
- Ubuntu
- Fedora
- Alpine
Other distributions can be used, but the necessary packages won’t be installed automatically. Contributions to increase the size of this list is welcome!
Syntax
from:
The full image ref (image name + tag). This will be set in the FROM
statement of the stage.
name:
The name of the stage. This is used when referencing the stage when using the from:
property in the copy
module.
modules:
The list of modules to execute. The exact same syntax used by the main recipe modules:
property.
shell:
(optional)
Allows a user to pass in an array of strings that are passed directly into the SHELL
instruction.