mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.5k stars 370 forks source link

jq is generating wrong cmdrc #493

Closed Greek64 closed 3 months ago

Greek64 commented 1 year ago

I have a image that is generated with a Dockerfile containing

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD ["bash"]

When using x11docker (x11docker -it -- test_image bash) with normal python (x11docker <= v7.4.2 OR jq uninstalled) the generated cmdrc contains

89  debugnote "cmdrc: Running container command:
90    '/bin/bash' '/entrypoint.sh'   'bash'"
91
92  '/bin/bash' '/entrypoint.sh'   'bash'
93
94  storeinfo cmdexitcode=$?

which works as expected.

When using x11docker (x11docker -it -- test_image bash) with jq (x11docker >= v7.5.0 with jq installed) the generated cmdrc contains

89  debugnote "cmdrc: Running container command:
90    /bin/bash"
91  "/entrypoint.sh  'bash'"
92
93  /bin/bash"
94  "/entrypoint.sh  'bash'
95
96  storeinfo cmdexitcode=$?

which fails with

/x11docker/cmdrc: 91: /entrypoint.sh  'bash': not found
/x11docker/cmdrc: 94: /bin/bash
/entrypoint.sh: not found
mackworthy commented 1 year ago

I think this is related to #485

mviereck commented 1 year ago

Thank you for the report! I'll check this.