Error while running Docker code in Powershell

The issue is Git converted line endings to Windows format, and now you have extra carriage returns (^M).

  1. Configure Git not to convert line endings on checkout by running
    git config --global core.autocrlf input
  2. Delete your local repository.
  3. Clone it again.

For more info on how Git deals with line endings, see Formatting and Whitespace

2 Likes