GithubHelp home page GithubHelp logo

radmen / docker-siad Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 95 KB

Docker image of Sia Daemon

Home Page: https://hub.docker.com/r/radmen/siad/

License: MIT License

JavaScript 75.75% Dockerfile 24.25%
docker docker-image sia siad siacoin

docker-siad's Introduction

docker-siad

Simple wrapper for Siacoin Daemon.
Built mostly for development.

Warning do not use this on production.

API proxy

siad has a silly way of exposing its API. It's possible to define address on which API server should listen (--api-addr) however when it's different than default user needs to pass --authenticate-api and --disable-api-security options.

--authenticate-api requires password which can be set only by user input (can't use env variables or STDIN).

This means that running daemon inside Docker container may be quite a problem.

For this reason I created simple Node.js proxy which bypasses security requirements.
Node running this image should be considered insecure.

Running deamon

Container has exposed ports 9980, 9981, 9982 which are proxied to according ports of siad (api, rpc, host).

Daemon data are stored in a VOLUME /siad/data. I suggest to map this volume to local directory - thanks to this blockchain sync will be faster on next runs. Also note that ANY change done in siad (like unlocked wallet) will be stored there.

Running container:

docker run -it --rm -v "${PWD}/siad-data:/siad/data" -p 9980:9980 radmen/siad

Check status:

curl -A "Sia-Agent" "http://{docker.host}:9980/consensus"

Supported options

It's possible to pass some options to siad:

docker run -it --rm -v "${PWD}/siad-data:/siad/data" -p 9980:9980 radmen/siad -M cghrtw

By default I wanted to allow passing all siad options but it didn't make sense so siad options list is limited to:

  • --agent
  • --modules/-M (default: cgtw)
  • --no-bootstrap
  • --profile
  • --profile-directory

Building image

Due to usage of multi-stage builds it's required to have Docker with minimum version 17.05.

To build image:

docker build . -t radmen/siad

docker-siad's People

Contributors

dependabot[bot] avatar radmen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-siad's Issues

Rebuild image after update in `siad`

Right now I need to build image and push it to Docker hub. This happens due to two reasons:

  • Docker hub uses older version of Docker and is unable to make build
  • I can't attach any "related" repo which could trigger rebuild of the image

This means that an external trigger needs to be created. It should simply force image rebuilding on docker hub.

Use stable version of siad

As for now Dockerfile simply grabs the newest possible version. I'm not familiar with go, but as I understand go get grabs the latest dev version, not stable. This has to change.

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.