2019-06-09 05:27:48 -07:00
|
|
|
FROM golang:1.12
|
2016-07-23 12:48:30 -04:00
|
|
|
|
2017-03-06 02:42:00 -05:00
|
|
|
# Add testing deps for curl
|
|
|
|
RUN echo 'deb http://httpredir.debian.org/debian testing main non-free contrib' >> /etc/apt/sources.list
|
|
|
|
|
2016-09-10 20:11:45 -04:00
|
|
|
# Grab deps (jq, hexdump, xxd, killall)
|
2016-07-24 14:08:47 -04:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2017-03-06 02:42:00 -05:00
|
|
|
jq bsdmainutils vim-common psmisc netcat curl
|
2016-07-24 14:08:47 -04:00
|
|
|
|
2017-06-26 12:08:38 +04:00
|
|
|
# Setup tendermint repo
|
2016-09-10 20:11:45 -04:00
|
|
|
ENV REPO $GOPATH/src/github.com/tendermint/tendermint
|
2018-03-06 15:32:52 +01:00
|
|
|
ENV GOBIN $GOPATH/bin
|
2016-09-10 20:11:45 -04:00
|
|
|
WORKDIR $REPO
|
2017-03-05 14:59:02 -05:00
|
|
|
|
2018-07-25 09:09:52 -07:00
|
|
|
# Copy in the code
|
2018-11-01 07:07:18 +01:00
|
|
|
# TODO: rewrite to only copy Makefile & other files?
|
2018-07-25 09:09:52 -07:00
|
|
|
COPY . $REPO
|
|
|
|
|
|
|
|
# Install the vendored dependencies
|
2017-03-05 14:59:02 -05:00
|
|
|
# docker caching prevents reinstall on code change!
|
2017-12-25 10:24:41 -05:00
|
|
|
RUN make get_tools
|
2016-07-24 14:08:47 -04:00
|
|
|
|
2018-06-26 11:10:54 +04:00
|
|
|
# install ABCI CLI
|
2018-07-24 09:42:08 -04:00
|
|
|
RUN make install_abci
|
2018-06-26 11:10:54 +04:00
|
|
|
|
2018-07-24 09:42:08 -04:00
|
|
|
# install Tendermint
|
|
|
|
RUN make install
|
2016-07-24 14:08:47 -04:00
|
|
|
|
2019-06-24 10:32:12 -04:00
|
|
|
RUN tendermint testnet \
|
|
|
|
--config $REPO/test/docker/config-template.toml \
|
|
|
|
--node-dir-prefix="mach" \
|
|
|
|
--v=4 \
|
|
|
|
--populate-persistent-peers=false \
|
|
|
|
--o=$REPO/test/p2p/data
|
2018-11-01 07:07:18 +01:00
|
|
|
|
|
|
|
# Now copy in the code
|
|
|
|
# NOTE: this will overwrite whatever is in vendor/
|
|
|
|
COPY . $REPO
|
|
|
|
|
2016-12-22 19:30:09 -05:00
|
|
|
# expose the volume for debugging
|
|
|
|
VOLUME $REPO
|
|
|
|
|
2018-06-12 02:25:52 -07:00
|
|
|
EXPOSE 26656
|
|
|
|
EXPOSE 26657
|