Command Line Reference
tplbuild is intended to be used through its command line interface. After
installing tplbuild with pip you can use the tplbuild CLI through the
tplbuild entrypoint or using python -m tplbuild. The rest of
this documentation will use the former. Each subcommand will explain how the
subcommand is expected to be used along with sample invocations. For more
details on each subcommand use the --help flag.
Build
Build some or all top-level images for a given profile and platform. This is useful when building images to use/test locally.
Sample invocations:
tplbuild build
tplbuild build --profile dev --platform linux/amd64 my-image
Publish
Publish some or all top-level images for a given profile to their configured repository. By default this will build each image for every configured platform and push a multi-architecture image. Any image without a repository configured will be ignored.
Sample invocations
tplbuild publish
tplbuild publish --profile dev --platform linux/amd64 --platform linux/arm64 my-image
Base Build
Build out-of-date base images and push them to the configured repository. Typically this will be invoked without any arguments to rebuild any base images that are out of date. If needed, additional flags can limit the profiles, platforms, and images that are built. This is useful primarily when testing changes.
tplbuild base-build
tplbuild base-build --check
tplbuild base-build --profile dev --platform linux/amd64 base-my-image
tplbuild base-build --update-salt --update-sources
Base Lookup
Print the full name of the requested base image. This is useful if you want to use the base image directly (for instance to do linting without building any top-level images).
tplbuild base-lookup base-my-image
tplbuild base-lookup --profile dev --platform linux/amd64 base-my-image
Source Update
This sub-command is used to explicitly update the locked source image digets to the latest digest available in each of their repositories. It is recommended to run this update at a regular interval (e.g. once a week) to ensure that upstream security updates eventually make their way into your project.
tplbuild source-update
tplbuild source-update node:18
Source Lookup
Print the full name with digest of the requested source image.
tplbuild source-lookup node:18