代码拉取完成,页面将自动刷新
# 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。