FROM node:10.9.0-alpine

## Update the system
RUN apk update && apk add bash

## Node-gyp needs python
RUN apk add --update \
    openssh-client \
    git \
    python \
    python-dev \
    py-pip \
    build-base \
  && pip install virtualenv \
  && rm -rf /var/cache/apk/*

## Add SSH keys for npm to be able to clone the FSL
RUN mkdir -p /root/.ssh/
COPY docker/env/dev/ssh/* /root/.ssh/
RUN chmod -R 600 /root/.ssh/*

## Supposedly makes npm more bearable
RUN npm set progress=false
RUN npm config set registry https://registry.npmjs.org/

CMD cd /var/www/deliveryApi/frontend && ./build.sh

