From 19bbb4e90a754405a0f22eea72d7ed4f54d823fd Mon Sep 17 00:00:00 2001 From: Nabil BENDAFI Date: Thu, 22 Feb 2018 11:49:03 +0100 Subject: [PATCH] Move from npm to yarn --- Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 019e445d..29f4068c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ # Dockerfile for GNS3 Web-ui development FROM node:carbon -RUN npm -g config set user root -RUN npm install -g @angular/cli - # Create user RUN useradd --user-group --create-home --shell /bin/false gns3-web-ui @@ -11,14 +8,18 @@ RUN useradd --user-group --create-home --shell /bin/false gns3-web-ui ENV HOME /home/gns3-web-ui WORKDIR $HOME +# Copy source +COPY . . +RUN chown -R gns3-web-ui:gns3-web-ui $HOME + # Switch to gns3-web-ui user USER gns3-web-ui -# Copy source -COPY . . - # Install dependencies -RUN npm install +RUN yarn global add @angular/cli +RUN yarn install --pure-lockfile + +ENV PATH /home/gns3-web-ui/.yarn/bin:$PATH EXPOSE 8080