diff --git a/docs/processes/entering-containers.md b/docs/processes/entering-containers.md index 5d8f7d2d5..5fdf90840 100644 --- a/docs/processes/entering-containers.md +++ b/docs/processes/entering-containers.md @@ -11,14 +11,26 @@ enter [ || --container-id ] # Connect to a The `enter` command can be used to enter a running container. The following variations of the command exist: ```shell +# enter the web process dokku enter node-js-app web + +# enter the first web process dokku enter node-js-app web.1 + +# enter a process for an app by container ID dokku enter node-js-app --container-id ID ``` +The `container-type` argument can be one either: + +- If your app has a `Procfile`, the name of a process type in your `Procfile`. +- If your app has no `Procfile`, the word `web`. + +If the specified process type is scaled up to more than one container, then the first container will be automatically selected. this can be overriden by specifying an integer index denoting the desired container, where the first container's index is `1`. + Additionally, the `enter` command can be executed with no ``. If only a single `` is defined in the app's Procfile, executing `enter` will drop the terminal into the only running container. This behavior is not supported when specifying a custom command; as described below. -By default, it runs a `/bin/bash`, but can also be used to run a custom command: +By default, `dokku enter` will run a `/bin/bash`, but can also be used to run custom commands: ```shell # just echo hi