bgdnvk / customer-support

Kubernetes and Microservices Full Stack Web App
Apache License 2.0
0 stars 0 forks source link

bash encoding #2

Open bgdnvk opened 1 year ago

bgdnvk commented 1 year ago

ERROR: unable to prepare context: path "./db\r" not found

The error message you're seeing indicates that the docker build command is unable to find the ./db directory because it has an extra carriage return character (\r) at the end of the path.

This can happen if the script was created or edited on a Windows machine and then transferred to a Unix-based system like Linux or macOS. Windows uses a different line ending format than Unix-based systems, which can cause issues with shell scripts.

To fix this issue, you can remove the extra carriage return character from the ./db path in the docker build command. You can do this by editing the buildimages.sh script and replacing the ./db path with ./db followed by a space and a backslash (./db ) to indicate that the path continues on the next line: docker build -t authdb:latest -f ./db/Dockerfile.db ./db \

This will ensure that the ./db path is correctly interpreted by the docker build command and the image can be built successfully.

bgdnvk commented 1 year ago

it keeps happening, I'm on Windows 11 using VSC with a NeoVim plugin - so one of those

bgdnvk commented 1 year ago

the solution is just to make a new file, kinda dumb but works