Reputation: 12062
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?
Upvotes: 2
Views: 1210
Reputation: 3326
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.
Upvotes: 2