Runs a command inside your application’s environment. By default, this spins up an ephemeral copy of your application that is deleted when the command completes.Usage:
Copy
porter app run [application] -- COMMAND [args...] [flags]
Options:
Flag
Description
-e
Connect to an existing replica instead of spinning up a new one (default: false). This will launch an interactive selector if there is more than one replica of your application running
--job
Name of the job to run (runs the job as defined and returns the job run ID without waiting)
--wait
Wait for the command to complete before exiting for non-interactive mode (default: false)
--allow-concurrent
Allow concurrent job runs when using --job (overrides job config if concurrency is disabled)
--cpu
CPU allocation in millicores (1000 millicores = 1 vCPU)
--ram
RAM allocation in Mi (1024 Mi = 1 GB)
-v
Print verbose output
The --cpu and --ram flags aren’t applicable when used with the -e flag as they require spinning up an ephemeral replica of your application.
Copy
porter app run my-app -- bash
In these examples, we use bash and python, but those commands need to actually be present within the container to run. With very lightweight containers, you may find that none of these are available. If you run into trouble here, feel free to reach out to the support team.
Builds a new version of the specified app. Attempts to use any build settings previously configured for the app, which can be overridden with flags.Usage:
Copy
porter app build [application] [flags]
Options:
Flag
Description
--build-context
Set the build context for the app
--dockerfile
Set the path to the Dockerfile when build method is docker
--tag
Set the image tag to use for the build
--build-method
Set the build method for the app (docker or pack)
--builder
Set the builder to use when build method is pack
--attach-buildpacks
Attach buildpacks to use when build method is pack
--no-pull
Do not pull the previous image before building
--remote
[EXPERIMENTAL] Build remotely using kpack in the cluster instead of locally
--verbose
Show verbose output during build (detailed logs, step timings)
Pushes the specified app to your default Porter registry. If no tag is specified, the latest commit SHA from the current branch will be used as the tag.Usage:
Creates and deploys a new app in your project. If no flags are specified, you will be directed to a series of required prompts to configure the app.Usage:
Copy
porter app create [flags]
Options:
Flag
Short
Description
--name
-n
The name of the app
--file
-f
Path to porter.yaml
--deploy-method
-m
The deployment method for the app (docker, repo)
--tag
Set the image tag used for the application (overrides field in yaml)
--image-repository
Set the image repository to use for the app
--attach-env-groups
Attach environment groups to the app
--build-context
Set the build context for the app
--build-method
Set the build method for the app (docker or pack)
--dockerfile
Set the path to the Dockerfile when build method is docker
--builder
Set the builder to use when build method is pack
--attach-buildpacks
Attach buildpacks to use when build method is pack
--remote
[EXPERIMENTAL] Build remotely using kpack in the cluster instead of locally
Updates the specified app with the provided configuration. This command differs from porter apply in that it only updates the app, but does not attempt to build a new image.Usage:
Copy
porter app update [application] [flags]
Options:
Flag
Short
Description
--file
-f
Path to porter.yaml
--tag
Set the image tag used for the application (overrides field in yaml)
--image-repository
Set the image repository to use for the app
--attach-env-groups
Attach environment groups to the app
--wait
-w
Wait until an update has rolled out successfully, otherwise time out
Copy
porter app update my-app -f porter.yaml
This command differs from porter apply in that it only updates the app configuration without attempting to build a new image.
Export the current Porter YAML configuration for an application. Useful for bootstrapping a porter.yaml file or inspecting the current configuration.Usage:
Copy
porter app yaml [application] [flags]
Options:
Flag
Description
--helm-overrides
Return only the helm overrides for the application
Copy
porter app yaml my-app
Redirect the output to create a porter.yaml file: porter app yaml my-app > porter.yaml