Docker OCI Parameter Passing Incus 6.3

There are docker images which require some additional commands, for example

docker run --name some-valkey -d valkey/valkey valkey-server --save 60 1 --loglevel warning

what is the recommended way of passing valkey-server --save 60 1 --loglevel warning with incus?

It is not currently supported.

However, @stgraber showed a workaround in one of his live sessions https://youtu.be/XIqVUQk4EMs?t=4156, which you can replicate with the following.

incus launch docker:valkey/valkey some-valkey -c raw.lxc=lxc.execute.cmd="valkey-server --save 60 1 --loglevel warning"
3 Likes

Thank you, it works perfectly - I hope it will get its own incus config parameter in future, but for now it works as required.

lxc.exec.cmd, that is brilliant. Thanks for bringing this up again.

One thing is not working as desired. I can see in the config:

image.description: docker.io/kimai/kimai2 (OCI)

in a case where the OCI was launched with

docker:kimai/kimai2:apache

The problem is that docker.io/kimai/kimai2 and docker.io/kimai/kimai2:apache are two different images! So incus --rebuild destroys the correct image replacing it with wrong one.

Can you file an issue for that at Issues · lxc/incus · GitHub?

1 Like