Pass --user to Docker app on startup

Hi,

for our next app we require a feature of Docker, which currently does not seem to be exposed to apps at the moment.

https://stash.z-hub.io/projects/K4U/repos/kopano-apps/browse/kopano-konnect/Makefile#35-47

For a successful start the process in the container needs to run with the same uid (guid is optional) as the kopano-server process. Additionally the --read-only flag would be nice.

Can the startup of a container already be influenced in such a way?

Hi,

To some degree, yes. You can do
ucr set appcenter/apps/kopano-konnect/docker/params=--readonly --user=...
and this will be added to the docker run command.

You can set this UCRV in the preinst script of the App. Maybe this helps?

2 Likes

Great, thanks this ucr variable does exactly what I needed.

out of curiosity which other hidden gems can be set this way? is there a list of possible values?

1 Like

Hi,

Glad it helps.

No hidden gems. And no list of values. Whatever you set there will be added blindly. You can easily break the installation by setting parameters unknown to docker. Furthermore, adjusting any network parameters does not always work. We do not alter the network configuration of the docker proccess.

To clarify : I wasn’t talking about Docker command line options, but other ucr values that influence how a docker container is run.

To clarify: I wasn’t talking about Docker command line options, but other ucr values that influence how a docker container or more accurately the app is run.

Mastodon