Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not create containers within Portainer running on Windows Server 2022 #9234

Closed
Nick-Portainer opened this issue Jul 20, 2023 · 7 comments
Assignees
Labels

Comments

@Nick-Portainer
Copy link

Bug description
When running Portainer within Windows Server 2022 using a Docker standalone environment, the creation of containers fail with the error Failure: invalid CapAdd: unknown capability: "CAP_AUDIT_WRITE"

Deployment of containers via the Docker CLI is successful and also show up in Portainer as running.

Expected behavior
Deployment of Docker containers via Portainer running on Windows Server 2022 successfully deploy.

Steps to reproduce the issue:

  1. Install Portainer on Windows Server 2022
  2. Attempt to create a container

Technical details:

  • Portainer version: 2.18.4
  • Docker version (managed by Portainer): 24.0.4
  • Platform (windows/linux): Windows
  • Command used to start Portainer (docker run -p 9443:9443 portainer/portainer): docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer-ce:latest
  • Browser: Edge
  • Have you reviewed our technical documentation and knowledge base? Yes
@cZe116
Copy link

cZe116 commented Aug 23, 2023

any news as to when this is getting fixed, as of right now im running into a almost same problem as you describe it, i deactivate all container capabilities and want to run a container from within portainer, and i still receive:

"Invalid CapDrop: unknown capability: CAP_AUDIT_CONTROL"

@canob
Copy link

canob commented Aug 25, 2023

Exactly the same is happening to me. Works perfectly with Windows Server 2019, but with Windows Server 2022 is not working, with the same error message:
Failure
invalid CapAdd: unknown capability: "CAP_AUDIT_WRITE"

@beckerben
Copy link

I found somewhat of a work around, if you go into the portainer -> host setup from the menu, then set the "Disable container capabilities for non-administrators" toggle on, then create a standard user account and grant access to the docker environment, when that user goes to create an image, the entire section for the items on the "Capabilities" tab is not there and therefore not in the docker commands run behind the scenes and it allows you to create containers from the portainer GUI....ideally there would be an easier way to simply ignore sending these altogether from the create container screen but doesn't appear so. I found that even trying to toggle all of the container capabilities off must still be sending them in the container create command as you will see it start to complain about the ones that are set untoggled :)

@canob
Copy link

canob commented Aug 26, 2023

I found another workaround (or maybe a temporary fix), that is to use a lower docker version.
I downgraded docker binary on Windows from 24.0.4 to 20.10.14, and is working perfectly fine.
Maybe and upper version (an upper 20.x or 23.x) work too, but I didn't tested.
Portainer version: 2.18.4
Docker version (managed by Portainer): 20.10.14
Platform (windows/linux): Windows Server 2019 and Windows Server 2022 (on both is working with docker 20.10.14)

@bjork-dev
Copy link

bjork-dev commented Oct 30, 2023

Got the same error message as canob:
"Failure invalid CapAdd: unknown capability: "CAP_AUDIT_WRITE" on Windows Server 2022 with Docker EE 23.0.7 & Portainer 2.19.

Downgrading to Docker EE 20.10.9 solved the issue.

@shirt-dev
Copy link

Getting the same error as well

@Nick-Portainer
Copy link
Author

Hi everyone, as of Portainer Server 2.20.3 STS this is now resolved. Please let me know how you get on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants