Giter Club home page Giter Club logo

nym-mixnode-docker's Introduction

OUTDATED / ABANDONED

Considering I don't see too much point in running the mixnode in docker in production due to IPv4/IPv6 combination and limits to amount of nodes per user I am not updating this unless I see a reason for it again.

nym-mixnode-docker

This is a multistage Docker image of the nym mixnode. The official nym repository can be found here: https://github.com/nymtech/nym

The image uses https://github.com/krallin/tini to handle the init. Considering it's not possible to do a docker run --init in Kubernetes it was added directly to the image.

The first stage of the build generates the executable and installs tini using apt. In the second stage these 2 files are copied out into a https://github.com/GoogleContainerTools/distroless container, resulting in the smallest possible Docker image of only 11MB.

For the sake of usability and being able to run bash scripts in the container I have decided to not use distroless and go with https://hub.docker.com/r/bitnami/minideb instead. This more than doubles the size of the image but it's still below 90MB.

Usage

Registry

The docker image is automatically built and can be pulled from Docker hub: https://hub.docker.com/r/snekone/nym-mixnode-docker

Configuration

The nym mixnode assumes there's a config.toml and two pem files. The location of the pem files can be configured in the config.toml. There's an example toml file which has all the possible options.

The CMD is setup to be: CMD [ "/usr/local/bin/nym-mixnode", "run", "--id", "mixer"]

This means the process will assume the name of the node is "mixer" and will look in the following directory for the config file: /root/.nym/mixnodes/mixer/config/config.toml

A VOLUME is configured for the directory: VOLUME [ "/root/.nym" ] This lets you mount this directory for easy configuration. docker run -v $PWD/config:/root/.nym snekone/nym-mixnode-docker

nym-init.sh

I have added a little script nym-init.sh which can be used in a kubernetes initContainer. It takes the same 3 arguments that the normal nym-mixnode init command does, albeit shorted to just one letter:

nym-init.sh -h 127.0.0.1 -i name-or-id -l 1

h for host i for name/id l for layer

nym-mixnode-docker's People

Contributors

snek avatar

Stargazers

Wouter De Schuyter avatar Andrew Smith avatar  avatar Sabree Blackmon avatar

Watchers

 avatar  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.