mirror of https://github.com/knative/func.git
1.6 KiB
1.6 KiB
func run
Run the function locally
Synopsis
Run the function locally
Runs the function locally in the current directory or in the directory specified by --path flag.
Building By default the function will be built if never built, or if changes are detected to the function's source. Use --build to override this behavior.
func run
Examples
# Run the function locally, building if necessary
func run
# Run the function, forcing a rebuild of the image.
# This is useful when the function's image was manually deleted, necessitating
# A rebuild even when no changes have been made the function's source.
func run --build
# Run the function's existing image, disabling auto-build.
# This is useful when filesystem changes have been made, but one wishes to
# run the previously built image without rebuilding.
func run --build=false
Options
-b, --build string[="true"] Build the function. [auto|true|false]. (default "auto")
-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-).
-h, --help help for run
-p, --path string Path to the function. Default is current directory (Env: $FUNC_PATH)
-r, --registry string Registry + namespace part of the image if building, ex 'quay.io/myuser' (Env: $FUNC_REGISTRY)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
SEE ALSO
- func - func manages Knative Functions