user1410270
user1410270

Reputation: 353

What does the USER keyword mean in Ubuntu

I'm just recently started to using the Windows Subsystem for Linux. I was trying to install Angular and ran into an error. I found a potential solution, but I don't understand part of the solution. In the script bellow, what do the keywords USER, ENV, and RUN mean, and what are they called? I tried running "USER node" and i got an error

USER node
RUN mkdir /home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
RUN npm install -g @angular/cli

Here is the entire answer in case you need more context https://github.com/angular/angular-cli/issues/7389

Upvotes: 1

Views: 986

Answers (2)

Andrija Ćeranić
Andrija Ćeranić

Reputation: 1713

USER sets a username to use when executing commands that follow later in Dockerfile. See Dockerfile docs

Upvotes: 2

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798636

That is not a script. Those directives have no meaning in Ubuntu.

That is a dockerfile. It is used by Docker to build images.

Upvotes: 1

Related Questions