RChain Node(RNode) Docker Build & Optional Push


This script can be used with Docker Community Edition in order do local docker builds of RChain platform and the creation of the docker image of the peer-to-peer node. Optionally, you can push the Docker image you create to Docker Hub or repo of your choice.

Quick Start

Download these two files.

https://github.com/rchain/rchain/blob/dev/scripts/rnode-docker-build-push-container.sh

https://github.com/rchain/rchain/blob/dev/scripts/rnode-docker-build-push-script.sh

./rnode-docker-build-push-container.sh <branch name> <git repo url> <docker hub destination repo>
Usage example:

./rnode-docker-build-push-container.sh dev https://github.com/rchain/rchain yourdestinationrepo/rnode:yourtagname


Enter your username and password when prompted for docker login at the end of the script. Make sure you use your correct credentials the first time.


Other Notes:

Working with Docker Environments

Every Docker environment can have its own unique settings. This has been tested on Docker running on Linux. You will always need the appropriate permissions for whatever you are doing in Docker. If you are running Docker CE on Windows you will need to "share your drive" on your host through Docker->Settings->Shared Drives and then make sure the drive that your container information resides on is checked. We will have more support and detailed documentation for all major platforms in the future. Right now, for ease of use and support we recommend using Docker on Linux host when possible. The convenience of using containers is absolutely no residual data issues pre or post build. You can always keep Docker images if you want or remove them.

Prerequisites

You will need a docker version that supports the needed functionality of this application - checkout  Docker Community Edition - https://www.docker.com/community-edition - The lastest stable version of CE should always work even though others should as well.

You may also want to install docker-compose version that supports Docker Compose file format version 3.1 or greater - Easily install single file with latest version from install docker-compose - https://docs.docker.com/compose/install/ .


To login to Docker Hub repo manually and push local container image you have built on your machine. You can always specify your own docker repo as Dockerhub repo is just default. See docker login (https://docs.docker.com/engine/reference/commandline/login/)  for more

docker tag <my source image id or name> <my destination repo:tag>
docker login
<enter username>
<enter pass>
docker push myuserorg/myrepo:mytag


For even more Docker documentation and getting started see https://docs.docker.com/get-started/.