-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (21 loc) · 835 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This file is autogenerated - modifications will be lost
FROM nginx:1.12
# Build the application
COPY . /tmp/
WORKDIR /tmp
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests gnupg wget && \
wget http://deb.nodesource.com/setup_8.x -O /tmp/node_setup.sh && \
bash /tmp/node_setup.sh && \
apt-get install nodejs && \
echo "^^^^^^^^ Building the application..." \
cd /tmp && \
npm install && \
./node_modules/@angular/cli/bin/ng build -prod --progress=false --output-path=/usr/share/nginx/html && \
echo "^^^^^^^^ Setting up nginx..." && \
cp nginx.conf /etc/nginx/conf.d/default.conf && \
echo "^^^^^^^^ Cleaning up..." && \
apt-get -u --purge remove -y nodejs gnupg wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /tmp/*