-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
35 lines (28 loc) · 819 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM node:lts-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
iperf3 apt-transport-https ca-certificates curl gnupg \
&& \
curl -o script.deb.sh https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh \
&& \
chmod +x script.deb.sh && ./script.deb.sh && rm script.deb.sh \
&& \
apt-get install -y --no-install-recommends speedtest \
&& \
rm -rf /var/lib/apt/lists/* \
&& \
mkdir /app /build-tmp /app/client
COPY . /build-tmp/
RUN cd /build-tmp \
&& \
npm run deploy \
&& \
cp -rt /app/ *.json node_modules server.js \
&& \
cp -r client/dist /app/client/ \
&& \
rm -rf /build-tmp
USER node
WORKDIR /app
EXPOSE 5000
ENTRYPOINT [ "npm", "run", "start"]