This topic tells you how to use the Tanzu Procfile Buildpack.

The Procfile Buildpack allows applications to define process types using a special file named Procfile located at the root of the application. Users may override buildpack-provided types or augment the app image with additional process types using a Procfile. A common use case is to override the default process type of the app image thereby setting a default start-command for the image.

The Procfile Buildpack can be used with any Cloud Native Buildpack. If a language family buildpack does not contain the Procfile Buildpack, it can be explicitly appended to the list of buildpacks during an image build.

Schema

The Procfile Buildpack looks for a file named Procfile at the root of the application. A Procfile must adhere to the following schema:

<type>: <command>
<type>: <command>

Example

The following adds a process with type equal to hello and makes it the default process. This uses the Paketo sample applications.

echo "hello: echo hello world" > nginx/nginx-sample/Procfile
pack build samples/nginx \
  --path nginx/nginx-sample \
  --buildpack <nginx-buildpack> \
  --buildpack <procfile-buildpack> \
  --default-process hello
docker run samples/nginx # should print "hello world"

Platform support

The Procfile buildpack is available on Broadcom Support as buildpackages that support Linux and Windows operating systems.

check-circle-line exclamation-circle-line close-line
Scroll to top icon