running command inside container
-
for an import script I want to run a bash command inside a (here: nextcloud..) container. This instruction to identify the container from the hostname doesn't seem to work anymore:
https://forum.cloudron.io/post/2011
what's the current approach?
-
The script mentioned in the other forum post should still work fine. At its core is the following docker cli line to detect the container id:
docker ps -q -f label=fqdn=$app -f label=isSubcontainer=false
The attributes it filters on have not changed since then.
-
Hi @perler
from the settings of the app on in the Cloudron dashboard you could open a terminal. which will give you access to the container.
You could also use the cloudron cli from your workstation.
cloudron exec --app $locationofyournextcloud
. -
The script mentioned in the other forum post should still work fine. At its core is the following docker cli line to detect the container id:
docker ps -q -f label=fqdn=$app -f label=isSubcontainer=false
The attributes it filters on have not changed since then.
-
-