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:
Jose Diaz-Gonzalez authored and GitHub committed 2024-09-23 21:53:21 -04:00
commit 68be10b661
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -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."