github.com/dawnbass68/maddcash@v0.0.0-20201001105353-c91c12cb36e5/build/docker/bin/Dockerfile (about) 1 # initialize from the image 2 3 FROM debian:9 4 5 RUN apt-get update && \ 6 apt-get upgrade -y && \ 7 apt-get install -y build-essential git wget pkg-config lxc-dev libzmq3-dev \ 8 libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev \ 9 liblz4-dev graphviz && \ 10 apt-get clean 11 12 ENV GOLANG_VERSION=go1.12.4.linux-amd64 13 ENV ROCKSDB_VERSION=v5.18.3 14 ENV GOPATH=/go 15 ENV PATH=$PATH:$GOPATH/bin 16 ENV CGO_CFLAGS="-I/opt/rocksdb/include" 17 ENV CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4" 18 19 RUN mkdir /build 20 21 # install and configure go 22 RUN cd /opt && wget https://storage.googleapis.com/golang/$GOLANG_VERSION.tar.gz && \ 23 tar xf $GOLANG_VERSION.tar.gz 24 RUN ln -s /opt/go/bin/go /usr/bin/go 25 RUN mkdir -p $GOPATH 26 RUN echo -n "GO version: " && go version 27 RUN echo -n "GOPATH: " && echo $GOPATH 28 29 # install rocksdb 30 RUN cd /opt && git clone -b $ROCKSDB_VERSION --depth 1 https://github.com/facebook/rocksdb.git 31 RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS=-fPIC make -j 4 release 32 RUN strip /opt/rocksdb/ldb /opt/rocksdb/sst_dump && \ 33 cp /opt/rocksdb/ldb /opt/rocksdb/sst_dump /build 34 35 # install build tools 36 RUN go get github.com/golang/dep/cmd/dep 37 RUN go get github.com/gobuffalo/packr/... 38 39 # download pre-loaded depencencies 40 RUN \ 41 cleanup() { rm -rf $GOPATH/src/blockbook; } && \ 42 trap cleanup EXIT && \ 43 cd $GOPATH/src && \ 44 git clone https://github.com/trezor/blockbook.git && \ 45 cd blockbook && \ 46 dep ensure -vendor-only && \ 47 cp -r vendor /build/vendor 48 49 ADD Makefile /build/Makefile 50 51 VOLUME /out 52 53 WORKDIR /build