Skip to main content
porter app contains commands for managing and interacting with your applications.

Prerequisites


porter app run

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:
porter app run [application] -- COMMAND [args...] [flags]
Options:
FlagShortDescription
--existing_pod-eConnect to an existing pod instead of spinning up a new one (default: false)
--container-cName of the container inside pod to run the command in
--interactiveRun in interactive mode (default: false)
--jobName of the job to run (runs the job as defined and returns the job run ID without waiting)
--waitWait for the command to complete before exiting for non-interactive mode (default: false)
--allow-concurrentAllow concurrent job runs when using --job (overrides job config if concurrency is disabled)
--cpuCPU allocation in millicores (1000 millicores = 1 vCPU)
--ramRAM allocation in Mi (1024 Mi = 1 GB)
--verbose-vPrint verbose output
porter app run my-app -- bash
If bash isn’t available in your container, try sh for a similar interactive experience.

porter app run cleanup

Delete any lingering ephemeral pods that were created with porter app run. Usage:
porter app run cleanup

porter app logs

Streams the latest logs for an application. Usage:
porter app logs [application] [flags]
Options:
FlagDescription
--serviceThe name of the service to get logs for
--searchSearch for a specific string in the logs
--revisionThe revision number to get logs for (default: -1, no filter applied)
Historical Log Options:
FlagDescription
--sinceLookback period from the current time to get historical logs (e.g., 12h, 30m)
--fromStart time (UTC) for historical logs (format: 2021-01-01T00:00:00Z)
--toEnd time (UTC) for historical logs (format: 2021-01-01T00:00:00Z)
--limitNumber of lines of historical logs to return
--newest-firstReturn newest historical logs first (default: true)
porter app logs my-app
By default, the command streams new logs. Setting --since or --from/--to switches to pulling historical logs.

porter app build

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:
porter app build [application] [flags]
Options:
FlagDescription
--build-contextSet the build context for the app
--dockerfileSet the path to the Dockerfile when build method is docker
--tagSet the image tag to use for the build
--build-methodSet the build method for the app (docker or pack)
--builderSet the builder to use when build method is pack
--attach-buildpacksAttach buildpacks to use when build method is pack
--no-pullDo not pull the previous image before building
--remote[EXPERIMENTAL] Build remotely using kpack in the cluster instead of locally
--verboseShow verbose output during build (detailed logs, step timings)
porter app build my-app

porter app push

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:
porter app push [application] [flags]
Options:
FlagDescription
--tagSet the image tag to use for the push
porter app push my-app

porter app create

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:
porter app create [flags]
Options:
FlagShortDescription
--name-nThe name of the app
--file-fPath to porter.yaml
--deploy-method-mThe deployment method for the app (docker, repo)
--tagSet the image tag used for the application (overrides field in yaml)
--image-repositorySet the image repository to use for the app
--attach-env-groupsAttach environment groups to the app
--build-contextSet the build context for the app
--build-methodSet the build method for the app (docker or pack)
--dockerfileSet the path to the Dockerfile when build method is docker
--builderSet the builder to use when build method is pack
--attach-buildpacksAttach buildpacks to use when build method is pack
--remote[EXPERIMENTAL] Build remotely using kpack in the cluster instead of locally
--verboseShow verbose output during build
porter app create

porter app update

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:
porter app update [application] [flags]
Options:
FlagShortDescription
--file-fPath to porter.yaml
--tagSet the image tag used for the application (overrides field in yaml)
--image-repositorySet the image repository to use for the app
--attach-env-groupsAttach environment groups to the app
--wait-wWait until an update has rolled out successfully, otherwise time out
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.

porter app update-tag

Updates the image tag for an application. This is functionally equivalent to running porter apply or porter app update with the --tag flag. Usage:
porter app update-tag [application] [flags]
Options:
FlagShortDescription
--tag-tThe specified tag to use (default: latest)
--wait-wWait and be notified when an update is successful, otherwise time out
porter app update-tag my-app --tag abc123def

porter app yaml

Export the current Porter YAML configuration for an application. Useful for bootstrapping a porter.yaml file or inspecting the current configuration. Usage:
porter app yaml [application] [flags]
Options:
FlagDescription
--helm-overridesReturn only the helm overrides for the application
porter app yaml my-app
Redirect the output to create a porter.yaml file: porter app yaml my-app > porter.yaml

porter app list

Lists all applications in the project. Usage:
porter app list

porter app manifests

Prints the Kubernetes manifests for an application. Usage:
porter app manifests [application]
porter app manifests my-app

porter app rollback

Rolls back an application to the last successful revision. Usage:
porter app rollback [application]
porter app rollback my-app