portainer: Portainer rootless no longer works

Bug description This is no longer possible to run portainer as rootless container

Expected behavior docker should be able to run as rootless container

Portainer Logs FATAL[0000] Failed creating file service: mkdir /data/certs: permission denied

Steps to reproduce the issue: run this follownig command: docker run -it --rm -u 1000 portainer/portainer-ce

Technical details:

  • Portainer version: 2.13.0
  • Docker version (managed by Portainer): 20.10.15, build fd82621
  • Platform (windows/linux): linux (debian 11)
  • Command used to start Portainer (docker run -it --rm -u 1000 portainer/portainer-ce):

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

It’s interesting that some users are reporting it working in 2.11 but not 2.13, and others reporting that it works in 2.13 but not 2.14. To me this indicates that either it’s an environmental issue, or that it’s something in the upgrade process that’s doing it.

@bonovski @brightdroid @HeyRay2 - are any of you perhaps able to test a fresh install of the non-working versions in your cases alongside the existing install? You should be able to achieve this using a different container name and a different portainer_data volume. If we can eliminate the environment as a cause we might be able to zero in on an upgrade process issue, perhaps.

I spun up a new docker instance and installed 2.13.1 and portainer came up without issue. I then updated it to 2.14.0 and the same “permission denied” error occurred:

time="2022-06-30T20:45:40Z" level=info msg="Encryption key file portainer not present" time="2022-06-30T20:45:40Z" level=info msg="Proceeding without encryption key" time="2022-06-30T20:45:40Z" level=info msg="Loading PortainerDB: portainer.db" time="2022-06-30T20:45:40Z" level=info msg="Opened existing store" version=50 time="2022-06-30T20:45:41Z" level=fatal msg="Failed creating compose manager: remove /docker-compose.plugin: permission denied"

Here the command I used: docker run -it --rm -u 1000:1000 -v /home/user/portainer/:/data portainer/portainer-ce:2.13.0, the folder /home/user/portainer have the right permissions but I get the following error: FATAL[0000] Failed creating compose manager: remove /docker-compose.plugin: permission denied. The command: docker run -it --rm -u 1000:1000 -v /home/user/portainer/:/data portainer/portainer-ce:2.11.0 works fine.