1 Star 1 Fork 3

ezpod/blockchain-explorer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright Tecnalia Research & Innovation (https://www.tecnalia.com)
# Copyright Tecnalia Blockchain LAB
#
# SPDX-License-Identifier: Apache-2.0
FROM node:8.15.0-alpine
# default values pf environment variables
# that are used inside container
ENV DEFAULT_WORKDIR /opt
ENV EXPLORER_APP_PATH $DEFAULT_WORKDIR/explorer
# database configuration
ENV DATABASE_HOST 127.0.0.1
ENV DATABASE_PORT 5432
ENV DATABASE_NAME fabricexplorer
ENV DATABASE_USERNAME hppoc
ENV DATABASE_PASSWD password
ENV STARTUP_SCRIPT /opt
# set default working dir inside container
WORKDIR $DEFAULT_WORKDIR
# copy external data to container
COPY . $EXPLORER_APP_PATH
# install required dependencies by NPM packages:
# current dependencies are: python, make, g++
RUN apk add --no-cache --virtual npm-deps python make g++ && \
python -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip install --upgrade pip setuptools && \
rm -r /root/.cache
# install NPM dependencies
RUN cd $EXPLORER_APP_PATH && npm install && npm build
# build explorer app
RUN cd $EXPLORER_APP_PATH && cd client && npm install && yarn build
# remove installed packages to free space
RUN apk del npm-deps
# expose default ports
EXPOSE 8080
# run blockchain explorer main app
CMD node $EXPLORER_APP_PATH/main.js && tail -f /dev/null
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ezpod/hyperledger-blockchain-explorer.git
git@gitee.com:ezpod/hyperledger-blockchain-explorer.git
ezpod
hyperledger-blockchain-explorer
blockchain-explorer
master

搜索帮助