Issue

When execute docker-compose up -d, the error occurred: /usr/bin/env: 'bash\r': No such file or directory

Reason

If it is a project created on Windows, it may automatically change the *. sh file under the scripts directory to the DOS file format, thus copying the file to the Linux platform and running with errors

Solution

You need to change the dos file format to the unix file format. Take the file scripts/wait-for-it.sh as an example:

  1. Open file
  1. 1$ vim scripts/wait-for-it.sh
  1. Change file format, then save
  1. 1:set ff=unix
  2. 2:wq

Done!!!