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=falseThe attributes it filters on have not changed since then. 
- 
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? 
- 
we want to use this in a script which runs locally on the cloudron server - what would be the preferred way here? 
- 
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=falseThe attributes it filters on have not changed since then. 
- 
 N nebulon marked this topic as a question on N nebulon marked this topic as a question on
- 
it's a one off thing, but preferrable within a script (so it should resolve the local container-id by hostname) 
- 
 G girish has marked this topic as solved on G girish has marked this topic as solved on
 
