Docker LXC Script brakes portainer installation after buisness upgrade #1758

Closed
opened 2025-11-20 05:16:51 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @MichaelVetter1979 on GitHub (Aug 21, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Docker, LXC

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/docker.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

When using the update script, there is no distinction between Portainer-CE and Portainer-EE installations. As a result, a Portainer-EE installation can become corrupted because the script selects Portainer-CE for installation instead.

🔄 Steps to reproduce the issue.

Step 1: Install a new LXC using the installation script, and during the process, select the option to install Portainer.
Step 2: Upgrade the Portainer installation from the Community Edition to the Business Edition using the Portainer UI.
Step 3: Access the LXC and execute the "update" command.

Paste the full error output (if available).

The installed database is for Portainer Business Edition, but the Community Edition has been started instead.

🖼️ Additional context (optional).

The problem could be resolved by downloading the script, changing the Portainer image from portainer-ce:latest to portainer-ee:lts, and running the script locally. I believe the script just needs some tweaking in the if cases and two separate cases for portainer-ce and portainer-ee.

Originally created by @MichaelVetter1979 on GitHub (Aug 21, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Docker, LXC ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/docker.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. When using the update script, there is no distinction between Portainer-CE and Portainer-EE installations. As a result, a Portainer-EE installation can become corrupted because the script selects Portainer-CE for installation instead. ### 🔄 Steps to reproduce the issue. Step 1: Install a new LXC using the installation script, and during the process, select the option to install Portainer. Step 2: Upgrade the Portainer installation from the Community Edition to the Business Edition using the Portainer UI. Step 3: Access the LXC and execute the "update" command. ### ❌ Paste the full error output (if available). The installed database is for Portainer Business Edition, but the Community Edition has been started instead. ### 🖼️ Additional context (optional). The problem could be resolved by downloading the script, changing the Portainer image from portainer-ce:latest to portainer-ee:lts, and running the script locally. I believe the script just needs some tweaking in the if cases and two separate cases for portainer-ce and portainer-ee.
saavagebueno added the not a script issue label 2025-11-20 05:16:51 -05:00
Author
Owner

@MickLesk commented on GitHub (Aug 21, 2025):

Then please dont use the Update function. We Serve only Community addons. Not paid Support. So Not an issue and Not planned. And an pull of portainer are still 3 lines

@MickLesk commented on GitHub (Aug 21, 2025): Then please dont use the Update function. We Serve only Community addons. Not paid Support. So Not an issue and Not planned. And an pull of portainer are still 3 lines
Author
Owner

@tremor021 commented on GitHub (Aug 21, 2025):

As @MickLesk already explained, we support only free/community only versions of apps we install in LXC's. It would be easy to make a check if you're running EE or CE edition, but then it would mean that we would need to support the EE version updates and stuff.

We just don't want to do that. Installing and updating Portainer is like couple of commands really, so maybe you should be just installing Docker without Portainer then just install/update on your own.

If you need help with that, their docs are super good

@tremor021 commented on GitHub (Aug 21, 2025): As @MickLesk already explained, we support only free/community only versions of apps we install in LXC's. It would be easy to make a check if you're running EE or CE edition, but then it would mean that we would need to support the EE version updates and stuff. We just don't want to do that. Installing and updating Portainer is like couple of commands really, so maybe you should be just installing Docker without Portainer then just install/update on your own. If you need help with that, their docs are super good
Author
Owner

@MichaelVetter1979 commented on GitHub (Aug 21, 2025):

The following would be a sollution to fix the problem by exchanging the portainer if block:

if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then 
  msg_info "Updating Portainer CE"
  $STD docker pull portainer/portainer-ce:latest
  $STD docker stop portainer && docker rm portainer
  $STD docker volume create portainer_data >/dev/null 2>&1
  $STD docker run -d \
    -p 8000:8000 \
    -p 9443:9443 \
    --name=portainer \
    --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:latest
  msg_ok "Updated Portainer CE"
fi

if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ee:lts$'; then 
  msg_info "Updating Portainer EE"
  $STD docker pull portainer/portainer-ee:lts
  $STD docker stop portainer && docker rm portainer
  $STD docker volume create portainer_data >/dev/null 2>&1
  $STD docker run -d \
    -p 8000:8000 \
    -p 9443:9443 \
    --name=portainer \
    --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ee:lts
  msg_ok "Updated PortainerEE"
fi

But I understand that you could not support the EE version. So I would suggest to at least change the line

if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then

into

if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then

This would lead to not updating the portainer container anymore after upgrading to the EE version and prevent the update call breaking the installation.

@MichaelVetter1979 commented on GitHub (Aug 21, 2025): The following would be a sollution to fix the problem by exchanging the portainer if block: ``` if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then msg_info "Updating Portainer CE" $STD docker pull portainer/portainer-ce:latest $STD docker stop portainer && docker rm portainer $STD docker volume create portainer_data >/dev/null 2>&1 $STD docker run -d \ -p 8000:8000 \ -p 9443:9443 \ --name=portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ce:latest msg_ok "Updated Portainer CE" fi if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ee:lts$'; then msg_info "Updating Portainer EE" $STD docker pull portainer/portainer-ee:lts $STD docker stop portainer && docker rm portainer $STD docker volume create portainer_data >/dev/null 2>&1 $STD docker run -d \ -p 8000:8000 \ -p 9443:9443 \ --name=portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ee:lts msg_ok "Updated PortainerEE" fi ``` But I understand that you could not support the EE version. So I would suggest to at least change the line ``` if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then ``` into ``` if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then ``` This would lead to not updating the portainer container anymore after upgrading to the EE version and prevent the update call breaking the installation.
Author
Owner

@tremor021 commented on GitHub (Aug 21, 2025):

Like i said, its not a problem of implementing a check in the update script, it would mean we will have to support EE version updates and installs, which is something we don't wanna do.

@tremor021 commented on GitHub (Aug 21, 2025): Like i said, its not a problem of implementing a check in the update script, it would mean we will have to support EE version updates and installs, which is something we don't wanna do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1758