This repository was archived by the owner on Nov 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-27
lines changed
Expand file tree Collapse file tree 1 file changed +7
-27
lines changed Original file line number Diff line number Diff line change 1- FROM node:10.4.1 -alpine as builder
1+ FROM node:10-alpine as builder
22WORKDIR /app
3+ COPY ./frontend /app
4+ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
5+ apk add make git && npm config set registry https://registry.npm.taobao.org && \
6+ npm install && npm run build
37
4- RUN npm i yarn -g
5- RUN apk add --no-cache git
6- COPY ./frontend/ /app
7-
8- RUN npm i cnpm -g && cnpm install && yarn build
9-
10- FROM golang:1.10.3-alpine3.7 as go-builder
11- ENV GOPATH /root/go
12- ENV REPO_PATH $GOPATH/src/github.com/irisnet/explorer/backend
13- ENV PATH $GOPATH/bin:$PATH
14-
15- RUN mkdir -p GOPATH REPO_PATH
16-
17- COPY ./backend/ $REPO_PATH
18- WORKDIR $REPO_PATH
19-
20- RUN apk add --no-cache make git && go get github.com/golang/dep/cmd/dep && dep ensure && make build
21-
22-
23- FROM alpine:3.7
24- ENV TZ Asia/Shanghai
25- RUN apk add -U tzdata && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
26- WORKDIR /app/backend
27- COPY --from=builder /app/dist/ /app/frontend/dist
28- COPY --from=go-builder /root/go/src/github.com/irisnet/explorer/backend/build/ /app/backend/
29- CMD ./irisplorer
8+ FROM nginx:1.15-alpine
9+ COPY --from=builder /app/dist/ /usr/share/nginx/html/
You can’t perform that action at this time.
0 commit comments