Skip to content

Commit cddecce

Browse files
committed
[CE-215] Enable user-dashboard in dockerhub
Change-Id: Ia03c2f02206098cac04cfb7869e5e8708638bf7e Signed-off-by: sally <lujjiang@cn.ibm.com>
1 parent c7fc9b3 commit cddecce

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

dockerhub/user-dashboard/Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright IBM Corp, All Rights Reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
FROM node:9.2 as build_login
6+
MAINTAINER haitao yue "hightall@me.com"
7+
RUN cd /tmp && git clone https://github.com/hyperledger/cello.git
8+
RUN cp -r /tmp/cello/user-dashboard/js /app
9+
RUN mkdir -p /usr/app
10+
RUN cp -r /tmp/cello/user-dashboard /usr/app/src
11+
RUN cd /app && npm install --loglevel http && npm run build
12+
13+
FROM node:9.2 as build_home
14+
MAINTAINER haitao yue "hightall@me.com"
15+
RUN cd /tmp && git clone https://github.com/hyperledger/cello.git
16+
RUN cp -r /tmp/cello/user-dashboard/js /app
17+
RUN mkdir -p /usr/app
18+
RUN cp -r /tmp/cello/user-dashboard /usr/app/src
19+
RUN cd /app/home && npm install --loglevel http && npm run build
20+
21+
FROM node:9.2 as build_dashboard
22+
MAINTAINER haitao yue "hightall@me.com"
23+
RUN cd /tmp && git clone https://github.com/hyperledger/cello.git
24+
RUN cp -r /tmp/cello/user-dashboard/js /app
25+
RUN mkdir -p /usr/app
26+
RUN cp -r /tmp/cello/user-dashboard /usr/app/src
27+
RUN cd /app/dashboard && npm install --loglevel http && npm run build
28+
29+
FROM node:9.2
30+
MAINTAINER haitao yue "hightall@me.com"
31+
RUN npm install -g requirejs
32+
RUN cd /tmp && git clone https://github.com/hyperledger/cello.git
33+
COPY package.json /
34+
RUN cd / && yarn install -g --verbose
35+
ENV PATH ${PATH}:/node_modules/.bin
36+
RUN mkdir -p /usr/app
37+
RUN cp -r /tmp/cello/user-dashboard /usr/app/src
38+
WORKDIR /usr/app/src
39+
ENV FABRIC_VERSION 1.0.5
40+
RUN cd /tmp && wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-${FABRIC_VERSION}/hyperledger-fabric-linux-amd64-${FABRIC_VERSION}.tar.gz \
41+
&& tar -zxvf hyperledger-fabric-linux-amd64-${FABRIC_VERSION}.tar.gz && mv bin/configtxgen /usr/local/bin/configtxgen
42+
RUN mkdir -p /etc/hyperledger
43+
RUN cp -r /tmp/cello/user-dashboard/fabric/fabric /etc/hyperledger/fabric
44+
COPY --from=build_login /usr/app/src/src/public/js/dist /usr/app/src/src/public/js/dist
45+
COPY --from=build_home /usr/app/src/src/public/js/dist /usr/app/src/src/public/js/dist
46+
COPY --from=build_dashboard /usr/app/src/src/public/js/dist /usr/app/src/src/public/js/dist
47+
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
48+
EXPOSE 8080
49+
CMD ["npm", "start"]

dockerhub/user-dashboard/package.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "bc-dashboard",
3+
"version": "1.0.0",
4+
"description": "It is the nodeJS version of blockchain dashboard",
5+
"main": "dist",
6+
"dependencies": {
7+
"body-parser": "^1.17.1",
8+
"cookie-parser": "^1.4.3",
9+
"express": "^4.15.2",
10+
"express-session": "^1.15.2",
11+
"gridfs-stream": "^1.1.1",
12+
"mongodb": "^2.2.26",
13+
"mongoose": "^4.13.2",
14+
"multer": "^1.3.0",
15+
"multer-gridfs-storage": "^1.1.1",
16+
"node-uuid": "^1.4.8",
17+
"pug": "^2.0.0-rc.1",
18+
"winston": "^2.3.1",
19+
"request": "^2.81.0",
20+
"consolidate": "^0.14.5",
21+
"swig": "^1.4.2",
22+
"cors": "^2.8.4",
23+
"nodemailer": "^4.2.0",
24+
"socket.io": "^2.0.4",
25+
"moment": "^2.19.1",
26+
"moment-range": "^3.0.3",
27+
"fabric-client": "^1.0.2",
28+
"fabric-ca-client": "^1.0.2",
29+
"log4js": "^0.6.38",
30+
"uuid4": "^1.0.0",
31+
"fs-extra": "^4.0.2",
32+
"express-bearer-token": "^2.1.0",
33+
"express-jwt": "^5.1.0",
34+
"jsonwebtoken": "^7.3.0",
35+
"shelljs": "^0.7.8",
36+
"jsonfile": "^4.0.0",
37+
"rimraf": "^2.6.2",
38+
"express-request-language": "^1.1.15",
39+
"sleep-promise": "^2.0.0",
40+
"request-promise": "^4.2.0"
41+
},
42+
"devDependencies": {
43+
"babel-cli": "^6.9.0",
44+
"babel-preset-es2015": "^6.9.0",
45+
"babel-preset-stage-0": "^6.5.0",
46+
"babel-plugin-transform-runtime": "^6.0.0",
47+
"eslint": "^3.1.1",
48+
"pm2": "^2.9.1",
49+
"nodemon": "^1.12.1"
50+
},
51+
"scripts": {
52+
"start": "pm2 --interpreter babel-node start src/index.js --no-daemon",
53+
"build": "babel src -s --ignore src/public -D -d dist && cp -r src/public dist/",
54+
"dev": "pm2 --interpreter babel-node start src/index.js --no-daemon --watch",
55+
"test": "echo \"Error: no test specified\" && exit 1"
56+
},
57+
"author": "hightall",
58+
"license": "ISC"
59+
}

0 commit comments

Comments
 (0)