Expose binary to console

When creating a custom service, what’s the best strategy to expose binaries from the service container to the console ?

I would like to achieve something similar to the command-volumes container.

After some experiments I realized it was not possible with docker and my understanding of what the command-volume container did was probably wrong.
The best option is probably to build a custom console.
Leaving this topic in place just in case.

it is possible, but perhaps the inverse of what you’re thinking :slight_smile:

in the zfs service, we add access to allow the currently running console to the zfs mgmt tools - which are actually run in the zfs container - basically, we link
in a script which then uses docker exec

see the use of wonka.sh in https://github.com/rancher/os-services/tree/master/images/20-zfs

I thought we’d blogged about it, but I can’t find anything.

Thanks ! I love that approach.
Does the setup_wonka.sh get executed in the console the moment you install the service ?
Is there something similar with the default services ? I’m trying to bundle my custom services in the install.