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 will look for a file named Procfile at the root of the application. A Procfile should 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. We use the Paketo sample applications here.

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 as buildpackages that support Linux and Windows Operating Systems on TanzuNet.

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