Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Help Wanted or Offered
  4. starting container process caused: exec: "/app/code/start.sh": permission denied: unknown

starting container process caused: exec: "/app/code/start.sh": permission denied: unknown

Scheduled Pinned Locked Moved Solved Help Wanted or Offered
20 Posts 3 Posters 9.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rmdesR rmdes

    I have followed other python app idea for now to try to package Tanzawa
    my build seem to be ok locally but when I push & install with cloudron cli
    I'm getting starting container process caused: Bad Field: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/app/code/start.sh": permission denied: unknown

    It seems to be a permission error because start . sh is where it is expected inside the container
    I tried with /app/pkg/start.sh and /app/code/start.sh

    I have my Dockerfile & start . sh here : https://paste.armada.digital/ogoxofadex.yaml
    someone from the app makers can have a look ?

    • by default tanzawa use sqlite3, i'm not trying to change that for a first package
    • only addon is localstorage, to have backup /app/data (cloudron manifest)
    • I have doubts about the path I have to use launch the python server (see end of the start . sh)
    • there is a createsuperuser python3 command to do manually, I'm okay with that for a first version
    • it seems my .env.sample is not being carried out because when I go inside the cloudron container (before this error blocked everything) the .env file was always empty
    timconsidineT Offline
    timconsidineT Offline
    timconsidine
    App Dev
    wrote on last edited by
    #2

    @rmdes I use a CHOWN statement to cloudron:cloudron towards the end of my Dockerfile

    Trying to find an example but git.cloudron.io is not responding at the moment.

    1 Reply Last reply
    0
    • rmdesR rmdes

      I have followed other python app idea for now to try to package Tanzawa
      my build seem to be ok locally but when I push & install with cloudron cli
      I'm getting starting container process caused: Bad Field: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/app/code/start.sh": permission denied: unknown

      It seems to be a permission error because start . sh is where it is expected inside the container
      I tried with /app/pkg/start.sh and /app/code/start.sh

      I have my Dockerfile & start . sh here : https://paste.armada.digital/ogoxofadex.yaml
      someone from the app makers can have a look ?

      • by default tanzawa use sqlite3, i'm not trying to change that for a first package
      • only addon is localstorage, to have backup /app/data (cloudron manifest)
      • I have doubts about the path I have to use launch the python server (see end of the start . sh)
      • there is a createsuperuser python3 command to do manually, I'm okay with that for a first version
      • it seems my .env.sample is not being carried out because when I go inside the cloudron container (before this error blocked everything) the .env file was always empty
      timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by timconsidine
      #3

      @rmdes try something like this

      RUN chown -R cloudron:cloudron /app/code

      Not guaranteed to fix but no harm trying

      EDIT : Maybe move the CHOWN commands out of start.sh into the Dockerfile ?

      rmdesR 1 Reply Last reply
      0
      • rmdesR rmdes

        I have followed other python app idea for now to try to package Tanzawa
        my build seem to be ok locally but when I push & install with cloudron cli
        I'm getting starting container process caused: Bad Field: (HTTP code 400) unexpected - OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/app/code/start.sh": permission denied: unknown

        It seems to be a permission error because start . sh is where it is expected inside the container
        I tried with /app/pkg/start.sh and /app/code/start.sh

        I have my Dockerfile & start . sh here : https://paste.armada.digital/ogoxofadex.yaml
        someone from the app makers can have a look ?

        • by default tanzawa use sqlite3, i'm not trying to change that for a first package
        • only addon is localstorage, to have backup /app/data (cloudron manifest)
        • I have doubts about the path I have to use launch the python server (see end of the start . sh)
        • there is a createsuperuser python3 command to do manually, I'm okay with that for a first version
        • it seems my .env.sample is not being carried out because when I go inside the cloudron container (before this error blocked everything) the .env file was always empty
        timconsidineT Offline
        timconsidineT Offline
        timconsidine
        App Dev
        wrote on last edited by
        #4

        @rmdes I don't understand this

        COPY start.sh /app/pkg/start.sh
        CMD [ "/app/code/start.sh" ]
        

        They're different locations.

        rmdesR 1 Reply Last reply
        0
        • timconsidineT timconsidine

          @rmdes I don't understand this

          COPY start.sh /app/pkg/start.sh
          CMD [ "/app/code/start.sh" ]
          

          They're different locations.

          rmdesR Offline
          rmdesR Offline
          rmdes
          wrote on last edited by rmdes
          #5

          @timconsidine Yes this was an error when I did the pastebin
          because I tried both ways, using /app/pkg/start sh
          and /app/code/start sh

          timconsidineT 1 Reply Last reply
          0
          • rmdesR rmdes

            @timconsidine Yes this was an error when I did the pastebin
            because I tried both ways, using /app/pkg/start sh
            and /app/code/start sh

            timconsidineT Offline
            timconsidineT Offline
            timconsidine
            App Dev
            wrote on last edited by
            #6

            @rmdes ah ok

            1 Reply Last reply
            0
            • timconsidineT timconsidine

              @rmdes try something like this

              RUN chown -R cloudron:cloudron /app/code

              Not guaranteed to fix but no harm trying

              EDIT : Maybe move the CHOWN commands out of start.sh into the Dockerfile ?

              rmdesR Offline
              rmdesR Offline
              rmdes
              wrote on last edited by
              #7

              @timconsidine gonna try to do this

              rmdesR 1 Reply Last reply
              0
              • rmdesR rmdes

                @timconsidine gonna try to do this

                rmdesR Offline
                rmdesR Offline
                rmdes
                wrote on last edited by
                #8

                Doing the install to cloudron now, let's see if it boots

                rmdesR 1 Reply Last reply
                0
                • rmdesR rmdes

                  Doing the install to cloudron now, let's see if it boots

                  rmdesR Offline
                  rmdesR Offline
                  rmdes
                  wrote on last edited by
                  #9

                  This is where I am now : https://paste.armada.digital/umomimefek.yaml

                  timconsidineT 2 Replies Last reply
                  0
                  • rmdesR rmdes

                    This is where I am now : https://paste.armada.digital/umomimefek.yaml

                    timconsidineT Offline
                    timconsidineT Offline
                    timconsidine
                    App Dev
                    wrote on last edited by
                    #10

                    @rmdes but it doesn't boot ?

                    1 Reply Last reply
                    0
                    • rmdesR rmdes

                      This is where I am now : https://paste.armada.digital/umomimefek.yaml

                      timconsidineT Offline
                      timconsidineT Offline
                      timconsidine
                      App Dev
                      wrote on last edited by
                      #11

                      @rmdes this may be an ignorant question : I am not a dev and not that familiar with python
                      In your Dockerfile you are using virtualenv
                      I understand this can be important in a system where other processes and apps are running.
                      But conceptually a Docker app is isolated
                      So virtualenv actually needed ?
                      Might it be adding complexity ?

                      rmdesR 2 Replies Last reply
                      0
                      • nebulonN Offline
                        nebulonN Offline
                        nebulon
                        Staff
                        wrote on last edited by
                        #12

                        @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 do chmod +x start.sh or you do this in the Dockerfile. Both works, however doing it in the Dockerfile adds another rather unnecessary image layer.

                        rmdesR timconsidineT 2 Replies Last reply
                        1
                        • timconsidineT timconsidine

                          @rmdes this may be an ignorant question : I am not a dev and not that familiar with python
                          In your Dockerfile you are using virtualenv
                          I understand this can be important in a system where other processes and apps are running.
                          But conceptually a Docker app is isolated
                          So virtualenv actually needed ?
                          Might it be adding complexity ?

                          rmdesR Offline
                          rmdesR Offline
                          rmdes
                          wrote on last edited by rmdes
                          #13

                          @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 🙂

                          1 Reply Last reply
                          1
                          • nebulonN nebulon

                            @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 do chmod +x start.sh or you do this in the Dockerfile. Both works, however doing it in the Dockerfile adds another rather unnecessary image layer.

                            rmdesR Offline
                            rmdesR Offline
                            rmdes
                            wrote on last edited by
                            #14

                            @nebulon Now that you say it, of course, it's logical that was missing !!
                            Thank you 🙂

                            1 Reply Last reply
                            0
                            • timconsidineT timconsidine

                              @rmdes this may be an ignorant question : I am not a dev and not that familiar with python
                              In your Dockerfile you are using virtualenv
                              I understand this can be important in a system where other processes and apps are running.
                              But conceptually a Docker app is isolated
                              So virtualenv actually needed ?
                              Might it be adding complexity ?

                              rmdesR Offline
                              rmdesR Offline
                              rmdes
                              wrote on last edited by
                              #15

                              @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 🙂

                              1 Reply Last reply
                              1
                              • nebulonN nebulon

                                @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 do chmod +x start.sh or you do this in the Dockerfile. Both works, however doing it in the Dockerfile adds another rather unnecessary image layer.

                                timconsidineT Offline
                                timconsidineT Offline
                                timconsidine
                                App Dev
                                wrote on last edited by
                                #16

                                @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

                                rmdesR 1 Reply Last reply
                                0
                                • timconsidineT timconsidine

                                  @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

                                  rmdesR Offline
                                  rmdesR Offline
                                  rmdes
                                  wrote on last edited by
                                  #17

                                  I went chmoding the file locally, now it's rebuilding the container, next is to push it to docker hub
                                  then cloudron install

                                  timconsidineT rmdesR 2 Replies Last reply
                                  0
                                  • rmdesR rmdes

                                    I went chmoding the file locally, now it's rebuilding the container, next is to push it to docker hub
                                    then cloudron install

                                    timconsidineT Offline
                                    timconsidineT Offline
                                    timconsidine
                                    App Dev
                                    wrote on last edited by
                                    #18

                                    @rmdes I can't stand the suspense 😉

                                    1 Reply Last reply
                                    0
                                    • rmdesR rmdes

                                      I went chmoding the file locally, now it's rebuilding the container, next is to push it to docker hub
                                      then cloudron install

                                      rmdesR Offline
                                      rmdesR Offline
                                      rmdes
                                      wrote on last edited by rmdes
                                      #19

                                      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 🙂

                                      timconsidineT 1 Reply Last reply
                                      1
                                      • rmdesR rmdes

                                        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 🙂

                                        timconsidineT Offline
                                        timconsidineT Offline
                                        timconsidine
                                        App Dev
                                        wrote on last edited by
                                        #20

                                        @rmdes congratulations !

                                        1 Reply Last reply
                                        1
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Bookmarks
                                        • Search