2
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?

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.