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

add cap-add option #526

Closed
sellersj opened this issue Jan 5, 2022 · 3 comments
Closed

add cap-add option #526

sellersj opened this issue Jan 5, 2022 · 3 comments

Comments

@sellersj
Copy link

sellersj commented Jan 5, 2022

Feature request to add the option for cap-add and related commands

Please provide a sample input docker run command

docker run --cap-add=NET_ADMIN my-image

What is the current output?*

version: '3.3'
services:
    my-image:
        image: my-image

What is the expected/desired output?

version: '3.3'
services:
    my-image:
        cap_add:
            - NET_ADMIN
        image: my-image

Reference
https://docs.docker.com/compose/compose-file/compose-file-v3/#cap_add-cap_drop

@raphamotta
Copy link

Please add this option

sharevb added a commit to sharevb/composerize that referenced this issue Sep 18, 2023
@tblancher
Copy link

For me, composerize works when --cap_add is added in the input field (note the underscore [_] instead of hyphen/dash [-]), but --cap-add does not work. This is a bug that should be fixed.

@sharevb
Copy link
Collaborator

sharevb commented Oct 14, 2023

Hi @tblancher, as far as docker run help says, there is no --cap_add option but --cap-add, so this is solved by my PR #571 deployed at https://deploy-preview-571--composerize.netlify.app/

@sharevb sharevb closed this as completed Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants