Coder Social home page Coder Social logo

docker-wallet's Introduction

Containerized Wallets:

WARNING: None of the Dockerfiles contained in this repository are intended for production wallet use! These are for automating building and testing of the master branch and any branches being considered for PR. By building these wallets and connecting them to the mainnet you are accepting the risk that you can lose the wallet.dat if you do not understand how container persistency work.

The mainnet_persistent Dockerfile is mostly an example of building a wallet from source in a container. It is not intended for active use except as a sample to learn from.

Testnet is setup with an example directory for both github master and branch (currently hardcoded to stablit). Both of which have a firstnode and wallet subdirectory that contains the Dockerfile and associated resource files to be built into the image. Try to keep this directory as empty as possible as the contents are included in the image context, so can bloat the size of the image and containers. Firstnode uses Docker "Volumes" to create a persistent storage location for wallet.dat and the blockchain. The wallet does not use a Docker Volume and therefore has non persistent storage. Every time the container is stopped it will lose its wallet.dat and every time its started will create a new wallet.dat! Simply running ./build.sh from the master or branch directory will perform a few steps. First it will Docker build the firstnode and will name the image firstnode_branch or firstnode_master (depending on which you built). Next it will start a container named firstnode_$type. Then it will build the image for the wallet and name it either wallet_master or wallet_branch. It will then start a container for the wallet, again named after the image for master or branch. When the docker run command starts the wallet it uses --link=firstnode_$type, which will automate the creation of /etc/hosts entries on the wallet so it can find firstnode, no mater what IP on the Docker network it gets assigned. The end of the ./build.sh script provides examples for connecting to bash on either container so commands can be run, coins transferred, etc. By incrementing the wallet name with a # you can start multiple wallets against the firstnode for more complex tests.

The next revision is going to consolidate the build.sh for both master and branch, as well as dynamically take the branch name in as an argument so it dynamically builds any branch. The images and containers will then be named based on the branch name, instead of "_branch". Allowing 'solo testnet' testing of multiple branches side by side. It should also include the 'secondnode' which is a container meant to connect from one developers docker network to a public IP of another testnet or firstnode. Allowing teams to test on the same testnet with docker.

docker-wallet's People

Contributors

cryptocarl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.