From 86f85525dd2d5e5e3ddf4fc7114c4c9a1e926b69 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 14 Feb 2017 20:30:15 +0400 Subject: [PATCH 1/3] dockerfile for develop branch --- DOCKER/Dockerfile.develop | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 DOCKER/Dockerfile.develop diff --git a/DOCKER/Dockerfile.develop b/DOCKER/Dockerfile.develop new file mode 100644 index 000000000..adbe6c046 --- /dev/null +++ b/DOCKER/Dockerfile.develop @@ -0,0 +1,35 @@ +FROM alpine:3.5 + +ENV DATA_ROOT /tendermint +ENV TMROOT $DATA_ROOT + +RUN addgroup tmuser && \ + adduser -S -G tmuser tmuser + +RUN mkdir -p $DATA_ROOT && \ + chown -R tmuser:tmuser $DATA_ROOT + +RUN apk add --no-cache bash curl jq + +ENV GOPATH /go +ENV PATH "$PATH:/go/bin" +RUN mkdir -p /go/src/github.com/tendermint/tendermint && \ + apk add --no-cache go build-base git && \ + cd /go/src/github.com/tendermint/tendermint && \ + git clone https://github.com/tendermint/tendermint . && \ + git checkout develop && \ + make get_vendor_deps && \ + make install && \ + glide cc && \ # 183Mb => 75Mb + cd - && \ + rm -rf /go/src/github.com/tendermint/tendermint && \ + apk del go build-base git + +VOLUME $DATA_ROOT + +EXPOSE 46656 +EXPOSE 46657 + +ENTRYPOINT ["tendermint"] + +CMD ["node", "--moniker=`hostname`", "--proxy_app=dummy"] From a756a9febae92bd03abe86ac19ab0b9cf8eb586c Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 15 Feb 2017 00:49:43 +0400 Subject: [PATCH 2/3] add readme mirroring https://hub.docker.com/r/tendermint/tendermint/ --- DOCKER/README.md | 59 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/DOCKER/README.md b/DOCKER/README.md index 8e660b980..bbb662637 100644 --- a/DOCKER/README.md +++ b/DOCKER/README.md @@ -1,20 +1,55 @@ -# Docker +# Supported tags and respective `Dockerfile` links -Tendermint uses docker for deployment of testnets via the [mintnet](github.com/tendermint/mintnet) tool. +- `0.8.0`, `0.8`, `latest` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/bf64dd21fdb193e54d8addaaaa2ecf7ac371de8c/DOCKER/Dockerfile) +- `develop` [(Dockerfile)]() -For the deterministic docker builds used in testing, see the [tests directory](https://github.com/tendermint/tendermint/tree/master/test) +`develop` tag points to the [develop](https://github.com/tendermint/tendermint/tree/develop) branch. -# Build and run a docker image and container +# Tendermint -These are notes for the dev team. +Tendermint Core is Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine, written in any programming language, and securely replicates it on many machines. -``` -# Build base Docker image -docker build -t "tendermint/tendermint" -t "tendermint/tendermint:0.8.0" -t "tendermint/tendermint:0.8" . +For more background, see the [introduction](https://tendermint.com/intro). + +To get started developing applications, see the [application developers guide](https://tendermint.com/docs/guides/app-development). + +# How to use this image -# Log into dockerhub -docker login +## Start one instance of the Tendermint core with the `dummy` app -# Push latest build to dockerhub -docker push tendermint/tendermint +A very simple example of a built-in app and Tendermint core in one container. + +``` +docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init +docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint ``` + +## mintnet-kubernetes + +If you want to see many containers talking to each other, consider using [mintnet-kubernetes](https://github.com/tendermint/mintnet-kubernetes), which is a tool for running Tendermint-based applications on a Kubernetes cluster. + +# Supported Docker versions + +This image is officially supported on Docker version 1.13.1. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# License + +View [license information](https://raw.githubusercontent.com/tendermint/tendermint/master/LICENSE) for the software contained in this image. + +# User Feedback + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub](https://github.com/tendermint/tendermint/issues) issue. If the issue is related to a CVE, please check for [a `cve-tracker` issue on the `official-images` repository](https://github.com/docker-library/official-images/issues?q=label%3Acve-tracker) first. + +You can also reach the image maintainers via [Slack](http://forum.tendermint.com:3000/). + +## Contributing + +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. + +Before you start to code, we recommend discussing your plans through a [GitHub](https://github.com/tendermint/tendermint/issues) issue, 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. From 6b499e2a8ba3500895ef58ab1184059e1ef2d38b Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 15 Feb 2017 00:57:54 +0400 Subject: [PATCH 3/3] add Makefile for docker files [ci skip] [circleci skip] --- DOCKER/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 DOCKER/Makefile diff --git a/DOCKER/Makefile b/DOCKER/Makefile new file mode 100644 index 000000000..092233017 --- /dev/null +++ b/DOCKER/Makefile @@ -0,0 +1,15 @@ +build: + # TAG=0.8.0 TAG_NO_PATCH=0.8 + docker build -t "tendermint/tendermint" -t "tendermint/tendermint:$TAG" -t "tendermint/tendermint:$TAG_NO_PATCH" . + +push: + # TAG=0.8.0 TAG_NO_PATCH=0.8 + docker push "tendermint/tendermint" "tendermint/tendermint:$TAG" "tendermint/tendermint:$TAG_NO_PATCH" + +build_develop: + docker build -t "tendermint/tendermint:develop" -f Dockerfile.develop . + +push_develop: + docker push "tendermint/tendermint:develop" + +.PHONY: build build_develop push push_develop