title: $'\r': command not found with Docker Compose
body: <p>I am trying to complete the instructions here: <a href="https://docs.docker.com/compose/aspnet-mssql-compose/" rel="nofollow noreferrer">https://docs.docker.com/compose/aspnet-mssql-compose/</a>.  I am at the last stage:</p>
  
  <pre><code>$ docker-compose up
  </code></pre>
  
  <p>I see this error:</p>
  
  <pre><code>DotNetCore$ sudo docker-compose up
  Starting dotnetcore_db_1 ... done
  Starting dotnetcore_web_1 ... done
  Attaching to dotnetcore_db_1, dotnetcore_web_1
  web_1  | ./entrypoint.sh: line 2: $'\r': command not found
  : invalid optionpoint.sh: line 3: set: -
  web_1  | set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
  web_1  | ./entrypoint.sh: line 5: $'\r': command not found
  web_1  | ./entrypoint.sh: line 15: syntax error: unexpected end of file
  dotnetcore_web_1 exited with code 2
  </code></pre>
  
  <p>I have spent all day trying to fix this simple error.  Here is the entrypoint.sh:</p>
  
  <pre><code>#!/bin/bash
  
  set -e
  run_cmd="dotnet run --server.urls http://*:80"
  
  until dotnet ef database update; do
  &gt;&amp;2 echo "SQL Server is starting up"
  sleep 1
  done
  
  &gt;&amp;2 echo "SQL Server is up - executing command"
  exec $run_cmd
  </code></pre>
  
  <p>So far I have tried:</p>
  
  <pre><code>1) Open file using Notepad ++  and select Edit/EOL Conversion.  Unix is greyed out.  This method is descrbed here: https://askubuntu.com/questions/966488/how-do-i-fix-r-command-not-found-errors-running-bash-scripts-in-wsl
  
  2) sudo dos2unix {filename}.  This method is desecribed here: https://askubuntu.com/questions/966488/how-do-i-fix-r-command-not-found-errors-running-bash-scripts-in-wsl
  </code></pre>
  
  <p>How can I resolve this?</p>