Dockerfile 986 Bytes
Newer Older
1
FROM node:10.19.0-stretch
2 3 4 5 6 7

RUN useradd -ms /bin/bash mc

WORKDIR /home/mc
RUN apt-get update
RUN apt-get -yq install nginx
8
# for testing
9
RUN apt update
10 11
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt install -y ./google-chrome-stable_current_amd64.deb
12 13 14 15 16 17 18 19

COPY . mc_frontend

COPY nginx.conf /etc/nginx/nginx.conf
RUN install -Dv /dev/null /run/nginx/nginx.pid

WORKDIR /home/mc/mc_frontend
# to get the version of the local CLI package, run: npm list @angular/cli | sed 's/[^0-9.]*//g' | sed -n 2p
20
RUN npm i -g cordova && cordova telemetry off && npm i -g @ionic/cli && npm i -g @angular/cli
21 22
# automatically say 'yes' to any occurring prompts during installation, e.g. "participate in Google's telemetry?"
RUN yes | npm install
23 24
# workaround to fix the missing binding issue for node-sass
RUN npm rebuild node-sass
25
# TODO: for some reason, this does not persist?!?!??!
26
# RUN ionic cordova build browser --prod --release --max-old-space-size=4096