forked from cryptobuks1/JsWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.testnet
More file actions
40 lines (34 loc) · 1.44 KB
/
Copy pathDockerfile.testnet
File metadata and controls
40 lines (34 loc) · 1.44 KB
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:10.16-alpine as build-stage
RUN apk add --no-cache --update \
python \
python-dev \
py-pip \
build-base \
git \
sudo
WORKDIR /app
RUN git clone https://github.com/velas/web3t.git web3t
RUN cd web3t && git checkout testnet
COPY . wallet
WORKDIR /app/web3t
RUN npm install
WORKDIR /app/wallet
RUN mkdir -p .compiled-ssr
RUN cp -pr /app/web3t .compiled-ssr/web3t
WORKDIR /app/wallet
RUN mkdir -p /app/wallet/.compiled-ssr/web3t/providers /app/wallet/.compiled-ssr/web3t/node_modules_embed/ethereumjs-tx
RUN npm install --ignore-scripts
# npm install is failed sometimes; added retry in case of fail
RUN npm install -g --unsafe-perm node-sass lsxc livescript || npm install -g --unsafe-perm node-sass lsxc livescript
RUN mkdir -p /app/wallet/.compiled-ssr/web3t/node_modules_embed/scryptsy/lib
RUN npm rebuild node-sass
RUN npm run wallet-build
FROM nginx:stable-alpine as production-stage
ADD nginx_config/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/wallet/.compiled/main-bundle.js /usr/share/nginx/html
COPY --from=build-stage /app/wallet/.compiled/main-bundle.css /usr/share/nginx/html
COPY --from=build-stage /app/wallet/.compiled/service-worker.js /usr/share/nginx/html
COPY --from=build-stage /app/wallet/.compiled/main-index.html /usr/share/nginx/html/index.html
COPY --from=build-stage /app/wallet/frame.html /usr/share/nginx/html/frame.html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]