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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Mappings for command, cap-add, pid, privileged etc #30

Closed
seffyroff opened this issue Apr 3, 2018 · 3 comments
Closed

Missing Mappings for command, cap-add, pid, privileged etc #30

seffyroff opened this issue Apr 3, 2018 · 3 comments

Comments

@seffyroff
Copy link

seffyroff commented Apr 3, 2018

Checked 馃憤
Do you want to request a feature or report a bug?
Bug. 馃悰
Please provide a sample input docker run command

docker run -d --name storageos \
    -e HOSTNAME \
    -e ADVERTISE_IP=xxx.xxx.xxx.xxx \
    -e JOIN=xxxxxxxxxxxxxxxxx \
    --net=host \
    --pid=host \
    --privileged \
    --cap-add SYS_ADMIN \
    --device /dev/fuse \
    -v /var/lib/storageos:/var/lib/storageos:rshared \
    -v /run/docker/plugins:/run/docker/plugins \
    storageos/node:0.10.0 server

What is the current output?*

version: 3
services:
    server:
        container_name: storageos
        environment:
            - HOSTNAME
            - ADVERTISE_IP=xxx.xxx.xxx.xxx
            - JOIN=xxxxxxxxxxxxxxxxx
        devices:
            - /dev/fuse
        volumes:
            - '/var/lib/storageos:/var/lib/storageos:rshared'
            - '/run/docker/plugins:/run/docker/plugins'
        image: server

What is the expected/desired output?

version: '3'
services:
    node:
        container_name: storageos
        command: server
        network_mode: "host"
        pid: "host"
        privileged: true
        cap_add:
            - SYS_ADMIN
        environment:
            - HOSTNAME
            - ADVERTISE_IP=${VAR_ADVERTISE_IP}
            - JOIN=${VAR_JOIN_TOKEN}
        devices:
            - /dev/fuse
        volumes:
            - '/var/lib/storageos:/var/lib/storageos:rshared'
            - '/run/docker/plugins:/run/docker/plugins'
        image: 'storageos/node:0.10.0'
@seffyroff seffyroff changed the title Missing Mappings for pid, privileged etc Missing Mappings for command, cap-add, pid, privileged etc Apr 3, 2018
WilliamMolina pushed a commit to WilliamMolina/composerize that referenced this issue Jul 30, 2018
@binhex
Copy link

binhex commented May 23, 2019

i would love to see this change visible in https://composerize.com/, as it is right now '--cap-add=NET_ADMIN' gets completed ignored when transforming from docker run command.

@magicmark
Copy link
Collaborator

@binhex @seffyroff Thanks for the issue!

Would anyone like to take a stab at a fix for this? Should be able to just add the mappings in here https://github.com/magicmark/composerize/blob/master/src/mappings.js

thanks!

@sharevb
Copy link
Collaborator

sharevb commented Oct 14, 2023

Hi, 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