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

New container entry point could be overriding cml pr command with shell homonym #715

Closed
0x2b3bfa0 opened this issue Sep 14, 2021 · 3 comments · Fixed by #716
Closed

New container entry point could be overriding cml pr command with shell homonym #715

0x2b3bfa0 opened this issue Sep 14, 2021 · 3 comments · Fixed by #716
Assignees
Labels
bug Something isn't working cml-image Subcommand discussion Waiting for team decision

Comments

@0x2b3bfa0
Copy link
Member

The new smart entry point introduced with #703 could be overriding cml pr the pr(1p) system executable. As per #703 (comment), we should probably consider aliasing only sh fb82963 or using CMD instead.

cml/Dockerfile

Line 108 in 4f7a5d9

ENTRYPOINT ["/bin/bash", "-c", "which -- \"$0\" &>/dev/null && exec \"$0\" \"$@\" || exec cml \"$0\" \"$@\""]

@0x2b3bfa0 0x2b3bfa0 added bug Something isn't working cml-image Subcommand discussion Waiting for team decision labels Sep 14, 2021
@casperdcl
Copy link
Contributor

I don't see any realistic scenario where anyone would do docker run cml pr expecting the behaviour of docker run cml /bin/pr

casperdcl added a commit that referenced this issue Sep 14, 2021
@DavidGOrtega
Copy link
Contributor

I think that ability is misleading, cml does not support that outside the docker image

casperdcl added a commit that referenced this issue Sep 15, 2021
@0x2b3bfa0
Copy link
Member Author

I still see the value of adding an exception for sh (and nothing else) so our images work on GitLab CI/CD. Allowing every command with allow/deny lists doesn't seem especially clean, but is the only way of allowing other commands like nvidia-smi as you wanted.

@casperdcl casperdcl self-assigned this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cml-image Subcommand discussion Waiting for team decision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants