starting container process caused: exec: "/app/code/start.sh": permission denied: unknown
-
@rmdes this may be an ignorant question : I am not a dev and not that familiar with python
In your Dockerfile you are usingvirtualenv
I understand this can be important in a system where other processes and apps are running.
But conceptually a Docker app is isolated
Sovirtualenv
actually needed ?
Might it be adding complexity ? -
@rmdes so the
start.sh
need to have the exec bit set. You can either do this in the app package folder itself and commit this to git, like on your laptop dochmod +x start.sh
or you do this in theDockerfile
. Both works, however doing it in the Dockerfile adds another rather unnecessary image layer. -
@timconsidine No worries, me neither
Actually it's quite common see other apps, but I'm not sure about the logic to do it in start sh or Dockerfile, which is the best I mean..
Taiga : https://git.cloudron.io/cloudron/taiga-app/-/blob/master/start.sh
Other python apps : https://git.cloudron.io/cloudron?filter=python
edit : outside cloudron context, I have seen virtualenv or pyenv used in a lot of dockerfiles for python project, so I'm quite confident starting from the original Dockerfile is the way to go
-
@timconsidine the idea with docker is precisely that, you start from a base image, here provided by cloudron base and from there you build the environnement you need for that particular app, here, based on the requirements.txt like you would do if you wanted to run the app in a virtual machine/docker/container or simply running in your laptop locally, you want this feature so that you can get exactly the required environnement loaded in the docker container, just to run what the original code require, that's how I understand it, but no worries I'm not a dev here, just a passionate learner
-
@nebulon said in starting container process caused: exec: "/app/code/start.sh": permission denied: unknown:
Both works, however doing it in the Dockerfile adds another rather unnecessary image layer.
That's very interesting, from perspective of someone learning to package.
Thank you -
I went chmoding the file locally, now it's rebuilding the container, next is to push it to docker hub
then cloudron install -
Alright, it's running!
Now I have to take care of env file not being taken into account
and the secret being generated in the Dockerfile not being stored in the .env.sample
hence the app boot, but screaming for an .env & appropriate secret