Merge pull request #7200 from dokku/6893-enter-without-container-type
Automatically select a container type if none is specified
This commit is contained in:
@@ -12,6 +12,9 @@ enter <app> [<container-type> || --container-id <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 first container
|
||||
dokku enter node-js-app
|
||||
|
||||
# enter the web process
|
||||
dokku enter node-js-app web
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ trigger-scheduler-docker-local-scheduler-enter() {
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$CONTAINER_ID" ]] && [[ -z "$CONTAINER_TYPE" ]]; then
|
||||
if [[ -z "$CONTAINER_ID" ]] && [[ -z "$CONTAINER_TYPE" || "$CONTAINER_TYPE" == "--" ]]; then
|
||||
AVAILABLE_CONTAINER_TYPES=($(get_app_running_container_types "$APP"))
|
||||
if [[ ${#AVAILABLE_CONTAINER_TYPES[@]} -gt 1 ]]; then
|
||||
dokku_log_warn "No container type specified."
|
||||
|
||||
Reference in New Issue
Block a user