Exec/debug - Is it possible to use a shell other than bash?
-
Hi,
I've packaged an minimalistic app based on Alpine, and I'm able to package it and make it run on my Cloudron but it seems impossible to debug it unless I install bash addition to the base alpine image.My attempts to use cloudron exec or cloudron debug have both failed unless bash is present in the image.
Is there a way to run a different shell and then what might I be missing? The source code for box mostly reference bash as a default choice which is totally valid but I just want to know if it's obligatory or not, I couldn't find a clear answer in the source code nor in docs about the packaging requirements.
Thanks!
-
For exec, you can do
cloudron exec --tty sh
.cloudron debug <cmd>
. cmd needs to somehow "hang". If you havesleep
in your Docker image, you can docloudron debug sleep infinity
.There was some legacy commander parsing code in our CLI. Luckily, commander now supports variadic args and I have fixed our CLI and published a new version 5.12.0 . Can you check with that?
-
-
Nice, the syntax
cloudron exec --app <app> --tty sh
works perfectly -
note that, there is very little benefit in packaging apps with a stripped down base image, as Cloudron will anyways will have the Cloudron baseimage on the system already, so if you base it from some other image, it actually increases the required disk space, while not having access to standard linux tooling within the app. Such alpine images do make sense if you have deployments where you deploy containers on various nodes, so each node can have very slim images, but this does not really apply to a Cloudron setup.
-
If I understand you right, having the cloudron base image would reduce the total disk space used by all my docker images running on cloudron?
Because right now I'm observing the opposite with what I have checked using du and docker images, where each docker image takes on average 3GB and the total of docker images is 80GB on disk.
Based on your explanation, sharing the base image (2.2GB in size) would also save around 60GB disk space for my 28/29 images. Or maybe something is not right in my understanding.
Yet having a base image 50MB in size for a small app makes more sense to my taste than having a base image as big as 2+GB?
What do you think @nebulon ?