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

unknown attribute "cap_drop", extensions must start with 'x-' #34

Closed
hakong opened this issue Dec 14, 2023 · 1 comment · Fixed by #37
Closed

unknown attribute "cap_drop", extensions must start with 'x-' #34

hakong opened this issue Dec 14, 2023 · 1 comment · Fixed by #37
Labels
bug Something isn't working
Milestone

Comments

@hakong
Copy link

hakong commented Dec 14, 2023

Example snippet from docker-compose file:

services:
  xyz:
    image: docker.io/xyz/xyz:latest
    restart: always
    environment:
      - DATABASE_USER=xyz
      - DATABASE_PASS=xxxx #insert your secure database password!
      - DATABASE_NAME=xyz
      - DATABASE_HOST=database
    ports:
      - 4000:4000
    volumes:
      - ./import:/opt/app/import
    cap_drop:
      - all

Result:

[xyz@container-1 ~]$ podlet -i compose docker-compose.yml
Error:
   0: File `docker-compose.yml` is not a valid compose file
   1: services.xyz: unknown attribute "cap_drop", extensions must start with 'x-' (see https://docs.docker.com/compose/compose-file/#extension) at line 5 column 5

Location:
   src/cli/compose.rs:63

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html says

[Container] options
DropCapability=CAP

podman run equivalent
--cap-drop=CAP

@k9withabone k9withabone added the bug Something isn't working label Dec 14, 2023
@k9withabone
Copy link
Member

Thanks for submitting an issue! This has actually already been fixed in the podman-v4.6.0 branch with commit fbb2c0c, which will be released soon.

@k9withabone k9withabone added this to the v0.2.2 milestone Dec 14, 2023
@k9withabone k9withabone linked a pull request Dec 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants