forked from WebDollar/vue-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1.13 KB
/
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
36
37
38
39
40
FROM node:16-alpine
# Install build packages and npm global packages
RUN apk update && \
apk add --no-cache make gcc g++ python3 certbot git && \
npm install -g cross-env webpack webpack-cli pm2 rimraf
# Copy files
COPY . .
# Run npm install for build
RUN npm install && \
npm rebuild node-sass
# Build
RUN npm run build
# Build User Interface
RUN git clone https://github.com/WebDollar/Node-WebDollar && \
cd Node-WebDollar && \
git checkout master && \
npm install -g node-gyp && npm install pm2 -g --unsafe-perm && \
npm install && \
npm run build_browser && \
npm run build_browser_user_interface && \
rm -f /public/WebDollar-dist/WebDollar-Protocol-bundle.js && \
rm -f /public/WebDollar-dist/WebDollar-Protocol-bundle.js.map && \
cp /vue-Frontend/public/WebDollar-dist/WebDollar-Protocol-bundle.js /public/WebDollar-dist/ && \
cp /vue-Frontend/public/WebDollar-dist/WebDollar-Protocol-bundle.js.map /public/WebDollar-dist/
# Clean Everything
RUN apk del make gcc g++ python3 && \
rm -rf /tmp/* /var/cache/apk/* && \
npm cache clean --force
# Ports
EXPOSE 80
EXPOSE 443
CMD ["npm","start"]