This template aims to make multi-stage container builds easier and more intuitive.
- Add installation scripts to
./template/containerfiles/run- These should be
.shscripts - They should be written as if you were running them through the command line
- These should be
- Open
./template/engine_instructions.yamlin a text editor - Specify the base image for the container as the value for the
basekey- The image needs to be specified as a full container registry URL if the image is stored in a private registry
- If the image is stored on DockerHub, a resolvable image name is sufficient
- Under the
imageskey, list the names of the install scripts- base name only, no extensions
- each name should be a yaml array element
- these will be intermediate images in the build
- Values in the
instructionskey provide further modifications for the container- these are all optional
ENV- environment variables to set in the container
- specify each variable as an array element with two keys:
name= variable namevalue= variable value
COPY- files and directories to copy to the container
./srcis provided for your convenience, but any file under the repo root can be copied- specify each variable as an array element with two keys:
src= path from repo rootdst= path in container
ENTRYPOINT- allows the container to be run as an executable
- default value is
/bin/bash -c - each space-delimited value should be a separate yaml array element
CMD- commands/parameters passed to the entrypoint
- each space-delimited value should be a separate yaml array element
- To push your container image to a container registry, include values in the keys under
taggingregistry= the URL of the container registry to push toname= what to name the stored imagetag= optional (defaults to latest)
- From
./templaterunmake