I'm trying to set up a simple shell script that will do something along the following lines. Let's call it docker_maker.sh
:
do stuff
docker build -t my-registry.com/my_image:latest .
docker push my-registry.com/my_image:latest
do more stuff
But when I call the script:
cd /where/my/dockerfile/is
sh docker_maker.sh
I get the following error:
unable to prepare context: path ".\r" not found
It seems that what is happening is that the docker build command is including the .\r
linebreak characters as part of the build call. Is there a way that I could avoid this from happening?