Code Troubleshooting

ABC Code Troubleshooting
This document shows how to resolve common problems encountered when running and developing abc group task.
Docker command fails in Git Bash on Windows
If your Docker commands fails with
docker: Error response from daemon: the working directory ‘C:/Program Files/Git/app’ is invalid, it needs to be an absolute path.See ‘docker run — help’.
or a similar error message when you execute Docker on Windows in Git Bash, you may need to change the shell. On Windows, it is recommended to execute Docker in other shells such as CMD, PowerShell, or Cygwin Bash.
Please read documentation to select the appropriate shell in VSCode terminal.
Docker command fails on Windows
If you are a Windows user, and you get an error mvn-entrypoint.sh exec not found…
$¡¯\r’: command not found
it is likely related to the wrong newline characters in your local copy of the repository.
The newline character (broadly speaking, what gets recorded to a file when you press Enter) is `\n` on Unix and `\r\n` on Windows. For those of you on Windows, git tries to “fix” the wrong line endings on the repository with Windows-specific ones when cloning. Thus, the `\n’ on the remote repo get replaced with `\r\n` in your local copy. However, you’re running the scripts inside the Ubuntu container, which is expecting the Unix line endings `\n`.
To fix this, on your Windows machine, first delete the repository, run the command git config –global core.autocrlf false
to tell git not to change the line endings, and clone the repository again. Note that this sets the option globally; for repository-specific settings see e.g. GitHub documentation

Code Help, Add WeChat: cstutorcs