Reputation: 4627
docker build -t serendipity111011/repo-name:latest -t serendipity111011/repo-name:$SHA -f ./Apollo API/Dockerfile ./Apollo API
I am trying to run the above command to build docker image and I am getting below error
invalid argument "serendipity111011/repo-name:" for "-t, --tag" flag: invalid reference format
What am I doing wrong?
Upvotes: 2
Views: 7319
Reputation: 4627
It was actually due to stupidity on my part. You have to escape the space correctly when you write out build commands like below
docker build -t serendipity111011/repo-name:latest -t serendipity111011/repo-name:$SHA -f ./Apollo\ API/Dockerfile ./Apollo\ API
I hope it helps someone who might be having same issue.
Upvotes: 4