2

I am trying to create a Docker container for Angular CLI. My Dockerfile looks like this:

FROM node:8.1.4
RUN npm install -g @angular-cli

However, Docker does not like the @ character in the run command.

npm info using [email protected]
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "@angular-cli": Tags may not have any characters that encodeURIComponent encodes.

I also tried to escape the @, but same error.

FROM node:8.1.4
RUN npm install -g \@angular-cli

The Angular CLI docs say I need the @ character. How can I do this in a Docker RUN command?

1 Answer 1

2

You've got a typo in there. According to the documentation, Angular CLI should be installed as follows:

npm install -g @angular/cli

Notice how you have used - instead of /.

The error is from npm, not Docker, which is what tipped me off.

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.