-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-355] Add user-dashboard docker build locally
Support docker build locally for user-dashboard. Change-Id: I6a083af3b6e194ca8e5647cd411bfbb0a9aec9b9 Signed-off-by: Haitao Yue <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM node:8.9 as build_login | ||
MAINTAINER haitao yue "[email protected]" | ||
COPY . /tmp/cello | ||
RUN cp -r /tmp/cello/user-dashboard/js /app | ||
RUN mkdir -p /usr/app | ||
RUN cp -r /tmp/cello/user-dashboard /usr/app/src | ||
RUN cd /app && npm install --loglevel http && npm run build | ||
|
||
FROM node:8.9 as build_home | ||
MAINTAINER haitao yue "[email protected]" | ||
COPY . /tmp/cello | ||
RUN cp -r /tmp/cello/user-dashboard/js /app | ||
RUN mkdir -p /usr/app | ||
RUN cp -r /tmp/cello/user-dashboard /usr/app/src | ||
RUN cd /app/home && npm install --loglevel http && npm run build | ||
|
||
FROM node:8.9 as build_dashboard | ||
MAINTAINER haitao yue "[email protected]" | ||
COPY . /tmp/cello | ||
RUN cp -r /tmp/cello/user-dashboard/js /app | ||
RUN mkdir -p /usr/app | ||
RUN cp -r /tmp/cello/user-dashboard /usr/app/src | ||
RUN cd /app/dashboard && npm install --loglevel http && npm run build | ||
|
||
FROM node:8.9 | ||
MAINTAINER haitao yue "[email protected]" | ||
RUN npm install -g requirejs | ||
COPY . /tmp/cello | ||
COPY user-dashboard/package.json / | ||
RUN cd / && yarn install -g --verbose | ||
ENV PATH ${PATH}:/node_modules/.bin | ||
RUN mkdir -p /usr/app | ||
RUN cp -r /tmp/cello/user-dashboard /usr/app/src | ||
WORKDIR /usr/app/src | ||
ENV FABRIC_VERSION 1.0.5 | ||
RUN cd /tmp && ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') && echo $ARCH &&wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${FABRIC_VERSION}/hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && tar -zxvf hyperledger-fabric-${ARCH}-${FABRIC_VERSION}.tar.gz && mv bin/configtxgen /usr/local/bin/configtxgen | ||
RUN mkdir -p /etc/hyperledger | ||
RUN cp -r /tmp/cello/user-dashboard/fabric/fabric /etc/hyperledger/fabric | ||
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric | ||
EXPOSE 8080 | ||
CMD ["npm", "start"] |