You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You may provide this flag multiple times for setting multiple environment variables. "+
121
115
"To unset, specify the environment variable name followed by a \"-\" (e.g., NAME-).")
122
116
cmd.Flags().Duration("start-timeout", f.Run.StartTimeout, fmt.Sprintf("time this function needs in order to start. If not provided, the client default %v will be in effect. ($FUNC_START_TIMEOUT)", fn.DefaultStartTimeout))
func run [-r|--registry][-i|--image][-e|--env][--build]
13
+
[-b|--builder][--builder-image][-c|--confirm]
14
14
[--address][--json][-v|--verbose]
15
15
16
16
DESCRIPTION
@@ -19,38 +19,32 @@ DESCRIPTION
19
19
Values provided for flags are not persisted to the function's metadata.
20
20
21
21
Containerized Runs
22
-
The --container flag indicates that the function's container should be
23
-
run rather than running the source code directly. This may require that
24
-
the function's container first be rebuilt. Building the container on or
25
-
off can be altered using the --build flag. The value --build=auto
26
-
can be used to indicate the function should be run in a container, with
27
-
the container automatically built if necessary.
28
-
29
-
The --container flag defaults to true if the builder defined for the
30
-
function is a containerized builder such as Pack or S2I, and in the case
31
-
where the function's runtime requires containerized builds (is not yet
32
-
supported by the Host builder.
22
+
You can build your function in a container using the Pack or S2i builders.
23
+
On the contrary, non-containerized run is achieved via Host builder which
24
+
will use your host OS' environment to build the function. This builder is
25
+
currently enabled for Go and Python. Building defaults to using the Host
26
+
builder when available. You can alter this by using the --builder flag
27
+
eg: --builder=s2i.
33
28
34
29
Process Scaffolding
35
-
This is an Experimental Feature currently available only to Go projects.
36
-
When running a function with --container=false (host-based runs), the
37
-
function is first wrapped code which presents it as a process.
38
-
This "scaffolding" is transient, written for each build or run, and should
39
-
in most cases be transparent to a function author. However, to customize,
40
-
or even completely replace this scafolding code, see the 'scaffold'
41
-
subcommand.
30
+
This is an Experimental Feature currently available only to Go and Python
31
+
projects. When running a function with --builder=host, the function is
32
+
first wrapped with code which presents it as a process. This "scaffolding"
33
+
is transient, written for each build or run, and should in most cases be
34
+
transparent to a function author.
42
35
43
36
EXAMPLES
44
37
45
38
o Run the function locally from within its container.
46
39
$ func run
47
40
48
41
o Run the function locally from within its container, forcing a rebuild
49
-
of the container even if no filesysem changes are detected
50
-
$ func run --build
42
+
of the container even if no filesystem changes are detected. There are 2
43
+
builders available for containerized build - 'pack' and 's2i'.
44
+
$ func run --build=<builder>
51
45
52
-
o Run the function locally on the host with no containerization (Go only).
53
-
$ func run --container=false
46
+
o Run the function locally on the host with no containerization (Go/Python only).
47
+
$ func run --builder=host
54
48
55
49
o Run the function locally on a specific address.
56
50
$ func run --address='[::]:8081'
@@ -72,7 +66,6 @@ func run
72
66
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". (default "pack")
73
67
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
74
68
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
75
-
-t, --container Run the function in a container. ($FUNC_CONTAINER) (default true)
76
69
-e, --env stringArray Environment variable to set in the form NAME=VALUE. You may provide this flag multiple times for setting multiple environment variables. To unset, specify the environment variable name followed by a "-" (e.g., NAME-).
77
70
-h, --help help for run
78
71
-i, --image string Full image name in the form [registry]/[namespace]/[name]:[tag]. This option takes precedence over --registry. Specifying tag is optional. ($FUNC_IMAGE)
0 commit comments