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

CMD variable should support different formats #37

Closed
kbdharun opened this issue Apr 21, 2024 · 0 comments · Fixed by #43
Closed

CMD variable should support different formats #37

kbdharun opened this issue Apr 21, 2024 · 0 comments · Fixed by #43

Comments

@kbdharun
Copy link
Member

The CMD command in Dockerfile syntax supports shell format (i.e. CMD command param1 param2), exec form and also ENTRYPOINT like format (i.e. CMD ["param1","param2"]); currently vib only supports the shell format and it parses it as /bin/sh -c ./command param1 param2 instead of Docker's normal ./command param1 param2.

IMO we should implement it as an ENTRYPOINT like format, i.e. CMD ["param1","param2"])` which can be passed along with an "entrypoint" variable in the recipe which points to the commands binary.

Also, When an "entrypoint" variable isn't defined in the recipe, the "cmd"'s definition should be interpreted as CMD ["executable","param1","param2"] (exec form) [This would work the best for most of our use cases]

Ref. https://github.com/Vanilla-OS/Vib/blob/main/api/structs.go and https://docs.docker.com/reference/dockerfile/#cmd

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

Successfully merging a pull request may close this issue.

1 participant