@@ -72,34 +72,34 @@ func hasCNBLauncherEntrypoint(ic ImageConfiguration) bool {
72
72
// execution environment as configured by the various buildpacks, and then hands off to the
73
73
// configured launch. The CNB launcher supports three types of launches:
74
74
//
75
- // 1. _predefined processes_ are named sets of command+arguments (similar to a container image's
76
- // ENTRYPOINT/CMD). Processes are created by the buildpacks, and oftentimes there is a
77
- // buildpack that parses a user's `Procfile` and turns those contents into processes.
78
- // There are two types of process definitions:
79
- // - *direct*: these are passed uninterpreted to os.exec; the command is resolved in PATH
80
- // Note that in practice we see direct-style definitions that execute `/bin/sh -c ...`
81
- // - *script*: the command is treated as a shell script and passed to `sh -c`, and any remaining
82
- // arguments on the container command-line are added to the shell and so become available
83
- // as positional arguments (see https://github.com/buildpacks/lifecycle/issues/218#issuecomment-567091462).
84
- // For example: `sh -c 'echo $0 $1 $2 $3' arg0 arg1 arg2 arg3` => `arg0 arg1 arg2 arg3`.
85
- // 2. _direct execs_: the user can provide a command-line which is treated like a _direct process_.
86
- // 3. _shell scripts_: the user can provide a shell script as the first argument and any
87
- // remaining arguments are available as positional arguments like _script processes_.
75
+ // 1. _predefined processes_ are named sets of command+arguments (similar to a container image's
76
+ // ENTRYPOINT/CMD). Processes are created by the buildpacks, and oftentimes there is a
77
+ // buildpack that parses a user's `Procfile` and turns those contents into processes.
78
+ // There are two types of process definitions:
79
+ // - *direct*: these are passed uninterpreted to os.exec; the command is resolved in PATH
80
+ // Note that in practice we see direct-style definitions that execute `/bin/sh -c ...`
81
+ // - *script*: the command is treated as a shell script and passed to `sh -c`, and any remaining
82
+ // arguments on the container command-line are added to the shell and so become available
83
+ // as positional arguments (see https://github.com/buildpacks/lifecycle/issues/218#issuecomment-567091462).
84
+ // For example: `sh -c 'echo $0 $1 $2 $3' arg0 arg1 arg2 arg3` => `arg0 arg1 arg2 arg3`.
85
+ // 2. _direct execs_: the user can provide a command-line which is treated like a _direct process_.
86
+ // 3. _shell scripts_: the user can provide a shell script as the first argument and any
87
+ // remaining arguments are available as positional arguments like _script processes_.
88
88
//
89
89
// Script-style launches support referencing environment variables since they are expanded by the shell.
90
90
//
91
91
// Configuring the launch depends on the CNB Platform API version being used, which is determined by
92
92
// the builder's lifecycle version, which is itself determined by the pack used to create a builder.
93
93
// - In Platform API 0.3 (pack 0.12 and earlier / lifecycle 0.8 and earlier) the image entrypoint
94
94
// is set to `/cnb/lifecycle/launcher`. The launch is determined by:
95
- // 1. If there are arguments:
96
- // 1. If there is a single argument and it matches a process type, then the corresponding
97
- // process is launched.
98
- // 2. If the first argument is `--` then the remaining arguments are treated as a _direct exec_.
99
- // 3. Otherwise the first argument is treated as a shell script launch with the first
100
- // argument as the script and remaining arguments are positional arguments to the script.
101
- // 2. If there are no arguments, a process type is taken from the `CNB_PROCESS_TYPE`
102
- // environment variable, defaulting to `web`.
95
+ // 1. If there are arguments:
96
+ // 1. If there is a single argument and it matches a process type, then the corresponding
97
+ // process is launched.
98
+ // 2. If the first argument is `--` then the remaining arguments are treated as a _direct exec_.
99
+ // 3. Otherwise the first argument is treated as a shell script launch with the first
100
+ // argument as the script and remaining arguments are positional arguments to the script.
101
+ // 2. If there are no arguments, a process type is taken from the `CNB_PROCESS_TYPE`
102
+ // environment variable, defaulting to `web`.
103
103
// - In Platform API 0.4 (pack 0.13 / lifecycle 0.9) the process types are turned into executables
104
104
// found in `/cnb/process/`, and the image entrypoint is set to the corresponding executable for
105
105
// the default process type. `CNB_PROCESS_TYPE` is ignored in this situation. A different process
0 commit comments