FROM node:14-slim as BUILD_IMAGE WORKDIR /home/mc/mc_frontend COPY package.json . RUN npm install FROM node:14-slim WORKDIR /home/mc/mc_frontend RUN apt-get update # install Chromium dependencies RUN apt-get install -y libasound2 libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdrm-dev libgbm1 libnss3 \ libpango-1.0-0 libxcomposite1 libxdamage1 libxkbcommon-dev libxrandr2 libxshmfence-dev # copy package.json so we can generate a clean lock file COPY package.json . # add Puppeteer manually because it will also install Chromium RUN npm install -D puppeteer COPY --from=BUILD_IMAGE /home/mc/mc_frontend/node_modules node_modules # to get the version of the local CLI package, run: npm list @angular/cli | sed 's/[^0-9.]*//g' | sed -n 2p RUN npm i -g @angular/cli # this makes the analytics prompt during upcoming "npm install" disappear, so this can also run in CI RUN ng analytics off COPY . . COPY ./config.xml ./www/config.xml # workaround to fix the missing binding issue for node-sass RUN npm rebuild node-sass # initialize the version file, it will get updated later RUN echo "export const VERSION = '';" | tee src/version.ts