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 entrypoint configuration #1558

Closed
msperl-github opened this issue Jan 5, 2025 · 6 comments · Fixed by #1845
Closed

OCI entrypoint configuration #1558

msperl-github opened this issue Jan 5, 2025 · 6 comments · Fixed by #1845
Assignees
Labels
API Changes to the REST API Documentation Documentation needs updating Easy Good for new contributors
Milestone

Comments

@msperl-github
Copy link

msperl-github commented Jan 5, 2025

Hello,
I'd like to install Keycloak as Incus OCI image.
Download worked fine, but I cannot get the container to start because a parameter needs to be passed (see: https://www.keycloak.org/getting-started/getting-started-docker)
However, I've tried passing it via raw.lxc: lxc.execute.cmd="start-dev"
Also tried using raw.lxc: lxc.execute.cmd="kc.sh start-dev"
Container still complains about not having the right or any argument for kc.sh and exits.
Is there any workaround for this?

Distribution of Host: Debian 12
Version: stable (as of 2025-01-05)

# incus start --console keycloak

Keycloak - Open Source Identity and Access Management

Find more information at: https://www.keycloak.org/docs/latest

Usage: 

kc.sh [OPTIONS] [COMMAND]

Use this command-line tool to manage your Keycloak cluster.

[...]

Kernel: 6.1.0-28-amd64 (Debian default)
Storage backend: lvm

Thank you!

@stgraber
Copy link
Member

stgraber commented Jan 5, 2025

raw.lxc: lxc.execute.cmd=/opt/keycloak/bin/kc.sh start-dev

@stgraber
Copy link
Member

stgraber commented Jan 5, 2025

But yeah, I agree that having a proper way of handling the entry point command would be good as we don't really want folks messing with raw.lxc in general.

@stgraber stgraber added this to the soon milestone Jan 5, 2025
@stgraber stgraber removed the Feature label Jan 17, 2025
@defect-track
Copy link

Another popular project which requires the raw.lxc command is Authentik. Depending on your setup you need multiple instances where you need to edit the raw.lxc to start the right process.

Thanks for looking into it.

@gwenya
Copy link
Contributor

gwenya commented Mar 23, 2025

@stgraber Could we just have a cmd config key that specifies the command and gets passed to lxc.execute.cmd?

So in the case of keycloak it would be like incus launch docker:keycloak -c cmd="/opt/keycloak/bin/kc.sh start-dev".

I think there's no way to get completely docker-like behaviour due to the entrypoint and cmd being concatenated together into Process.Args by skopeo already, but this would certainly be a step up from specifying it in raw.lxc.

@stgraber
Copy link
Member

stgraber commented Mar 23, 2025

Yeah. I was thinking of introducing:

  • oci.entrypoint
  • oci.uid
  • oci.gid
  • oci.cwd

As config keys which we would preset to the value from config.json if not directly provided by the user (same behavior we have for environment.).

@stgraber stgraber changed the title OCI Parameter support OCI entrypoint configuration Mar 23, 2025
@stgraber stgraber added Documentation Documentation needs updating Easy Good for new contributors API Changes to the REST API labels Mar 23, 2025
@gwenya
Copy link
Contributor

gwenya commented Mar 23, 2025

Oh right, those others would be pretty neat too. I'll see about making a PR in the next days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating Easy Good for new contributors
Development

Successfully merging a pull request may close this issue.

4 participants