Newer
Older
Casey Kuhlman
committed
# Pull base image.
Casey Kuhlman
committed
MAINTAINER Eris Industries <support@erisindustries.com>
#-----------------------------------------------------------------------------
# dependencies
#-----------------------------------------------------------------------------
# install erisdb
#
ENV GO15VENDOREXPERIMENT 1
Casey Kuhlman
committed
# set the repo and install erisdb
ENV REPO $GOPATH/src/github.com/eris-ltd/eris-db
WORKDIR $REPO
RUN cd ./cmd/erisdb && go build -o /usr/local/bin/erisdb && \
Casey Kuhlman
committed
#-----------------------------------------------------------------------------
# install mint-client tools
Casey Kuhlman
committed
# set the repo and install mint-client
ENV REPO github.com/eris-ltd/mint-client
Casey Kuhlman
committed
RUN mkdir --parents $GOPATH/src/$REPO
WORKDIR $GOPATH/src/$REPO
RUN git clone --quiet https://$REPO . && \
git checkout --quiet $BRANCH && \
Casey Kuhlman
committed
go install ./... && \
mv $GOPATH/bin/mint* /usr/local/bin && \
mv ./mint-client /usr/local/bin/
#-----------------------------------------------------------------------------
Casey Kuhlman
committed
# cleanup
RUN rm -rf $GOPATH/src/* && \
unset REPO && \
unset BRANCH
Casey Kuhlman
committed
#-----------------------------------------------------------------------------
# start script
# install the wrapper/start script
COPY DOCKER/start.sh /usr/local/bin/erisdb-wrapper
#-----------------------------------------------------------------------------
# chain manager scripts and default mint config
RUN mkdir -p $ECM_PATH
COPY DOCKER/chain_* $ECM_PATH/
COPY DOCKER/config.toml $ECM_PATH/
COPY DOCKER/version.sh $ECM_PATH/
#-----------------------------------------------------------------------------
# permission the directories
RUN chown -R eris /usr/local/bin
RUN chown -R eris $ECM_PATH
#-----------------------------------------------------------------------------
# root dir
Casey Kuhlman
committed
# persist data, set user
VOLUME /home/$USER/.eris
WORKDIR /home/$USER/.eris
USER $USER
RUN mkdir --parents /home/$USER/.eris/chains/tendermint
ENV TMROOT /home/$USER/.eris/chains/tendermint
Casey Kuhlman
committed
# ports: 1337:eris-db API; 46656:tendermint-peer; 46657:tendermint-rpc
EXPOSE 1337
EXPOSE 46656
EXPOSE 46657