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

Documentation for cmd and entrypoint are imprecise/inconsistent with implementation #698

Closed
reddaly opened this issue Sep 11, 2024 · 0 comments · Fixed by #705
Closed

Documentation for cmd and entrypoint are imprecise/inconsistent with implementation #698

reddaly opened this issue Sep 11, 2024 · 0 comments · Fixed by #705

Comments

@reddaly
Copy link

reddaly commented Sep 11, 2024

Documentation for oci_image_rule:

cmd: A file containing a newline separated list to be used as the command & args of the container. These values act as defaults and may be replaced by any specified when creating a container.

entrypoint: A file containing a newline separated list to be used as the entrypoint to execute when the container starts. These values act as defaults and may be replaced by an entrypoint specified when creating a container. NOTE: Setting this attribute will reset the cmd attribute

Documentation for oci_image:

cmd: Command & argument configured by default in the running container. See documentation above.

entrypoint: Entrypoint configured by default in the running container. See documentation above.

Usage in e2e tests is inconsitent with these definitions:

oci_image(
name = "image",
base = "@distroless_base",
cmd = [
"--arg1",
"--arg2",
],
entrypoint = ["/custom_bin"],
env = {
"ENV": "/test",
},
)


Issues with the above:

  1. "Command & argument configured by default in the running container" seems incorrect. The above example shows only the arguments are specified.

  2. "A file containing a newline separated list to be used as the entrypoint to execute when the container starts. These values..." The type accepted here seems to be a list of strings, not a file.

@reddaly reddaly changed the title Documentation for cmd and entrypoint are inconsistent with implmentation Documentation for cmd and entrypoint are imprecise/inconsistent with implementation Sep 11, 2024
plobsing added a commit to plobsing/rules_oci that referenced this issue Sep 28, 2024
plobsing added a commit to plobsing/rules_oci that referenced this issue Oct 15, 2024
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