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

oci: config entrypoint #2000

Open
vdice opened this issue Oct 31, 2023 · 0 comments
Open

oci: config entrypoint #2000

vdice opened this issue Oct 31, 2023 · 0 comments
Labels
area/oci OCI distribution for Spin apps

Comments

@vdice
Copy link
Member

vdice commented Oct 31, 2023

Explore configuring an entrypoint in the OCI config file for a Spin app.

Originally from #1882 (comment):

Spin currently ignores this value, runwasi parses it and sends to the shim via RuntimeContext but it is ignored by spin's shim: https://github.com/deislabs/containerd-wasm-shims/blob/6ca8df8247d94cf1dc6ce5e529b00ee728aee4ec/containerd-shim-spin-v1/src/engine.rs#L123

The reason this is working when packages as a container is because / is the command is set on the yaml: https://github.com/deislabs/containerd-wasm-shims/blob/6ca8df8247d94cf1dc6ce5e529b00ee728aee4ec/README.md?plain=1#L95

In the case of a shim such as wasmtime/wasmedge it makes sense to have pass the entrypoint info as arg0 and we even do some additional parsing to allow for entering other functions in the wasm module https://github.com/containerd/runwasi/blob/642cafacde77d25762c8c0c0ca78ff1010caff16/crates/containerd-shim-wasm/src/container/context.rs#L17-L25

So in this case we can continue to use / in the command for the pod yaml or you could set this value in the config (maybe image name?) and users wouldn't need to set the command to / in the yaml. In the future maybe it can be useful otherwise we can revisit this in the next iteration of the config support in containerd.

@vdice vdice added this to Spin Triage Nov 8, 2023
@vdice vdice moved this to 🆕 Triage Needed in Spin Triage Nov 8, 2023
@vdice vdice added the area/oci OCI distribution for Spin apps label Nov 8, 2023
@vdice vdice moved this from 🆕 Triage Needed to 🔖 Backlog in Spin Triage Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oci OCI distribution for Spin apps
Projects
Status: 🔖 Backlog
Development

No branches or pull requests

1 participant