From 6990e70a48606f2b1d6ee8490ea6bc26c89fc50a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Tue, 7 Jul 2026 01:55:48 -0600 Subject: [PATCH] fix: improve Docker installation script for apt-based distros - Added a check to ensure `apt-mark` is available before holding Docker packages to prevent unintended upgrades. - Removed the Docker version update logic from the `update_dokploy` function to streamline the installation process and avoid unnecessary complexity. --- apps/website/public/install.sh | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/apps/website/public/install.sh b/apps/website/public/install.sh index 7fb043c..eddbc4c 100644 --- a/apps/website/public/install.sh +++ b/apps/website/public/install.sh @@ -131,8 +131,10 @@ install_dokploy() { echo "Docker already installed" else curl -sSL https://get.docker.com | sh -s -- --version $DOCKER_VERSION - # Hold docker packages to prevent unintended upgrades - apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras + # Hold docker packages to prevent unintended upgrades (apt-based distros only) + if command_exists apt-mark; then + apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras + fi fi # Check if running in Proxmox LXC container and set endpoint mode @@ -360,28 +362,6 @@ update_dokploy() { echo "Updating Dokploy to version: ${VERSION_TAG}" - # Check Docker version and update if necessary - if command -v docker >/dev/null 2>&1; then - current_docker_version=$(docker --version | grep -oP '\d+\.\d+\.\d+' | head -1) - if [ "$current_docker_version" != "$DOCKER_VERSION" ]; then - echo "Docker version mismatch detected. Current: $current_docker_version, Target: $DOCKER_VERSION" - echo "Updating Docker to version $DOCKER_VERSION..." - - # Unhold packages to allow update - apt-mark unhold docker-ce docker-ce-cli docker-ce-rootless-extras 2>/dev/null - - # Install specific Docker version - curl -sSL https://get.docker.com | sh -s -- --version $DOCKER_VERSION - - # Hold packages again - apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras - - echo "Docker updated to version $DOCKER_VERSION" - else - echo "Docker version $current_docker_version matches target version" - fi - fi - # Pull the image docker pull $DOCKER_IMAGE