Search code examples
djangodocker-composedivio

===== docker migrate release ===== [FATAL tini (8)] exec /app/migrate.sh failed: Permission denied


Successfully tagged app-registry-local.aldryn.net/agrowdevapi-test-37ae123fee35488aa7afaf88779408b0.2403de75863d452293464511e6f01f0d:rel-57c445067a40479da6af0e140792c18a finished docker build ===== docker migrate release ===== [FATAL tini (6)] exec /app/migrate.sh failed: Permission denied enter image description here


Solution

  • Unfortunately because you are using an external Git repository, I cannot see exactly what is occurring. However, based on experience, this is the issue. The deployment fails because an error when it runs the migration commands:

    [FATAL tini (6)] exec /app/migrate.sh failed: No such file or directory

    You can see the same thing occurs locally if you run: docker-compose run web ./migrate.sh It's still not very informative, but try this:

    docker-compose run web bash
    

    followed by:

    ./migrate.sh
    

    You will see:

    bash: ./migrate.sh: /bin/sh^M: bad interpreter: No such file or directory
    

    And this is the clue. The first line of the ./migrate.sh file contains a ^Mcharacter, a Windows line ending. I think this may not be the only file affected - a git diff in your project seemed to show that many, many files were changed.

    What editor are you using? You will need to resave that file, and possibly others. Please see https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings.