From 43cc267a9f05b685b8bb6d487719a11afc5d8fd9 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Tue, 7 Jul 2026 09:44:14 -0600 Subject: [PATCH] fix: make install.sh POSIX-compatible so curl | sh works on dash The docs instruct 'curl -sSL https://dokploy.com/install.sh | sh', but on Debian/Ubuntu sh is dash, which has no [[ or =~. The RELEASE_TAG detection failed with 'sh: 264: [[: not found' and, since the script does not run with set -e, silently fell through to the elif branch, so stable installs via sh got RELEASE_TAG= instead of RELEASE_TAG=latest. Replace the bash-only test with a POSIX case statement. Verified end-to-end on Ubuntu 20.04/24.04 and Debian 12 (dash), Alpine 3.20 (busybox ash), and Rocky 9 / Fedora 41 (bash as sh), including the canary, latest and update code paths. Both '| sh' and '| bash' now work. Fixes #157 --- apps/website/public/install.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/website/public/install.sh b/apps/website/public/install.sh index 150746e..dae65b3 100644 --- a/apps/website/public/install.sh +++ b/apps/website/public/install.sh @@ -291,14 +291,21 @@ install_dokploy() { # Installation # Set RELEASE_TAG environment variable for canary/feature versions + # POSIX-compatible (no [[ ]]): the script is documented as `curl ... | sh`, + # and on Debian/Ubuntu sh is dash, which has no [[ or =~ (issue #157) release_tag_env="" - if [[ "$VERSION_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then - # Specific version (v0.26.6, v0.26.7, etc.) → latest - release_tag_env="-e RELEASE_TAG=latest" - elif [ "$VERSION_TAG" != "latest" ]; then - # canary, feature/*, etc. → use the tag as-is - release_tag_env="-e RELEASE_TAG=$VERSION_TAG" - fi + case "$VERSION_TAG" in + v[0-9]*.[0-9]*.[0-9]*) + # Specific version (v0.26.6, v0.26.7, etc.) → latest + release_tag_env="-e RELEASE_TAG=latest" + ;; + latest) + ;; + *) + # canary, feature/*, etc. → use the tag as-is + release_tag_env="-e RELEASE_TAG=$VERSION_TAG" + ;; + esac docker service create \ --name dokploy \