Portainer fails to reinstall

Details:

  • Date | Thu Jun 29 09:55:05 EDT 2023
  • DietPi version | v8.18.2 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Debian mini.iso
  • Hardware | Native PC (x86_64) (ID=21)
  • Kernel version | Linux lab 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
  • Distro | bullseye (ID=6)
  • Command | docker run -d -p 9002:9000 --name=portainer --restart=always -v /run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
  • Exit code | 125
  • Software title | DietPi-Software

Uploaded bug report reference code : e98b4e6e-815a-45f2-bbd8-2d2553943877

Steps to reproduce

dietpi-software reinstall 185

Expected behaviour

Correct reinstallation of Portainer

Actual behaviour

Reinstallation fails with the following:

docker: Error response from daemon: Conflict. The container name "/portainer" is already in use by container "(truncated)". 
You have to remove (or rename) that container to be able to reuse that name.

looks like there is still a Portainer container running. Therefore, no new container can be created. Can you check following

docker container ls -all