├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for Hyperledger fabric base image, with everything (peer, membersrvc) to go! 2 | # If you need a peer node to run, please see the yeasy/hyperledger-peer image. 3 | # Workdir is set to $GOPATH/src/github.com/hyperledger/fabric 4 | # Data is stored under /var/hyperledger/db and /var/hyperledger/production 5 | 6 | # Currently, the binary will look for config files at corresponding path. 7 | 8 | FROM golang:1.7 9 | MAINTAINER Baohua Yang 10 | 11 | ENV DEBIAN_FRONTEND noninteractive 12 | 13 | RUN apt-get update \ 14 | && apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev \ 15 | && rm -rf /var/cache/apt 16 | 17 | # install rocksdb 18 | RUN cd /tmp \ 19 | && git clone --single-branch -b v4.1 --depth 1 https://github.com/facebook/rocksdb.git \ 20 | && cd rocksdb \ 21 | && PORTABLE=1 make shared_lib \ 22 | && INSTALL_PATH=/usr/local make install-shared \ 23 | && ldconfig \ 24 | && cd / \ 25 | && rm -rf /tmp/rocksdb 26 | 27 | RUN mkdir -p /var/hyperledger/db \ 28 | && mkdir -p /var/hyperledger/production 29 | 30 | # install hyperledger peer and membersrvc 31 | RUN mkdir -p $GOPATH/src/github.com/hyperledger \ 32 | && cd $GOPATH/src/github.com/hyperledger \ 33 | #&& git clone --single-branch -b master --depth 1 https://github.com/hyperledger/fabric.git \ 34 | && git clone --single-branch -b master --depth 1 http://gerrit.hyperledger.org/r/fabric \ 35 | && cd $GOPATH/src/github.com/hyperledger/fabric/peer \ 36 | && CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install \ 37 | && go clean \ 38 | && cd $GOPATH/src/github.com/hyperledger/fabric/membersrvc \ 39 | && CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install \ 40 | && go clean \ 41 | && cp $GOPATH/src/github.com/hyperledger/fabric/devenv/limits.conf /etc/security/limits.conf 42 | 43 | # this is only a workaround for current hard-coded problem when using as fabric-baseimage. 44 | RUN ln -s $GOPATH /opt/gopath 45 | 46 | # this is to keep compatible 47 | RUN PATH=$GOPATH/src/github.com/hyperledger/fabric/build/bin:$PATH 48 | 49 | WORKDIR $GOPATH/src/github.com/hyperledger/fabric 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Docker-Hyperledger 2 | === 3 | 4 | This is deprecated, pls see [hyperledger-fabric-peer]((https://github.com/yeasy/docker-hyperledger-fabric-peer). 5 | 6 | Out-of-the-box Docker images for [Hyperledger](https://www.hyperledger.org). 7 | 8 | Related images: 9 | 10 | * [hyperledger-peer](https://github.com/yeasy/docker-hyperledger-peer): With peer configurated, can be utilized as a peer node (NVP, VP). 11 | * [hyperledger-membersrvc](https://github.com/yeasy/docker-hyperledger-membersrvc): With the membership service configurated, can be utilized as the authentication node. 12 | 13 | If you want to quickly deploy a hyperledger cluster, please see [hyperledger-cluster](https://github.com/yeasy/docker-compose-files#hyperledger). 14 | 15 | # Supported tags and respective Dockerfile links 16 | 17 | * [`latest` (Dockerfile)](https://github.com/yeasy/docker-hyperledger/blob/master/Dockerfile) 18 | * [`0.6-dp` (Dockerfile)](https://github.com/yeasy/docker-hyperledger/blob/0.6-dp/Dockerfile) 19 | * [`0.5-dp` (Dockerfile)](https://github.com/yeasy/docker-hyperledger/blob/0.5-dp/Dockerfile) 20 | * [`dev` (Dockerfile)](https://github.com/yeasy/docker-hyperledger/blob/dev/Dockerfile) 21 | 22 | For more information about this image and its history, please see the relevant manifest file in the [`yeasy/docker-hyperledger` GitHub repo](https://github.com/yeasy/docker-hyperledger). 23 | 24 | # What is docker-hyperledger? 25 | Full functional Docker image with necessary hyperledger fabric binaries (peer, membersrvc) deployed. 26 | 27 | Please use the `dev` tag if you want have a full development env with tools like protoc and NodeJs supports. 28 | 29 | # How to use this image? 30 | The docker image is auto built at [https://registry.hub.docker.com/u/yeasy/hyperledger/](https://registry.hub.docker.com/u/yeasy/hyperledger/). 31 | 32 | ## In Dockerfile 33 | ```sh 34 | FROM yeasy/hyperledger:latest 35 | ``` 36 | 37 | ## Local Run 38 | The image is only for the base environment. So please refer to [hyperledger-peer](https://hub.docker.com/r/yeasy/hyperledger-peer/) if you want a local run. 39 | 40 | # Which image is based on? 41 | The image is built based on [golang:1.6](https://hub.docker.com/_/golang) image. 42 | 43 | # What has been changed? 44 | ## install dependencies 45 | Install required libsnappy-dev, zlib1g-dev, libbz2-dev. 46 | 47 | ## install rocksdb 48 | Install required rocksdb 4.1. 49 | 50 | ## install hyperledger 51 | Install hyperledger fabric and install the peer and membersrvc. 52 | 53 | # Supported Docker versions 54 | 55 | This image is officially supported on Docker version 1.7.0. 56 | 57 | Support for older versions (down to 1.0) is provided on a best-effort basis. 58 | 59 | # Known Issues 60 | * N/A. 61 | 62 | # User Feedback 63 | ## Documentation 64 | Be sure to familiarize yourself with the [repository's `README.md`](https://github.com/yeasy/docker-hyperledger/blob/master/README.md) file before attempting a pull request. 65 | 66 | ## Issues 67 | If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/yeasy/docker-hyperledger/issues). 68 | 69 | You can also reach many of the official image maintainers via the email. 70 | 71 | ## Contributing 72 | 73 | You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. 74 | 75 | Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/yeasy/docker-hyperledger/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. 76 | --------------------------------------------------------------------------------