Define application build defaults

This topic describes how you set the application-specific default build configuration.

Before you begin

Before you define application build defaults, you must have a ContainerApp for your application. Create a ContainerApp by running:

tanzu app init

Set your application’s build path

To set or modify a reference to the root of your application’s source code, run:

tanzu app config build path set --app=<APP-NAME> <FILE-PATH>

Where:

  • <FILE-PATH> references the root of your application’s source code.
  • <APP-NAME> references the ContainerApp name defined in tanzu app init. This argument is optional and defaults to the ContainerApp at the root of your current working directory if no app name is passed.

Set or delete build environment variables

  • To create non-secret build environment variables, run:

    tanzu app config build env-non-secret set --app=<APP-NAME> BP_JAVA_VERSION=10
    
  • To remove non-secret build environment variables, run:

    tanzu app config build env-non-secret delete --app=<APP-NAME> BP_JAVA_VERSION
    

Define your application’s build type

To set your application’s default container image build solution, Docker or Buildpacks, run:

tanzu app config build type set --app=<APP-NAME>

? Select container build type to use for this app:  [Use arrows to move, type to filter]
> buildpacks
  docker
check-circle-line exclamation-circle-line close-line
Scroll to top icon