Jump to content

Search the Community

Showing results for tags 'docker'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News & Announcements
    • Announcements
  • Denarius Discussions
    • General Discussion
    • Tutorials & Help
    • Marketing & PR
    • Development
    • Mining & Staking
    • Trading & Exchanges
    • Marketplace
    • FPGA Forums
  • Other Discussions
    • The Lounge
    • Cryptocurrencies

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 5 results

  1. I think this is an easier way to setup an electrumx server. It's not that bad once you go through the steps. Trying to be thorough. Install docker My github for this. https://github.com/buzzkillb/docker-electrumx We will end up running denariusd in a container and electrumx in a container. First create a folder on your server or vps to store the denarius blockchain. This can be anywhere, but lets make this easy. cd ~ mkdir .denarius cd .denarius nano denarius.conf Sample denarius.conf, pay attention as we will need the rpcuser and rpcpassword. rpcuser=denariusrpc rpcpassword=MAKEUPSOMEPASSWORD maxconnections=125 rpcport=32369 port=33369 daemon=0 listen=1 server=1 discover=1 txindex=1 bind= We either sync from block 0 or use chaindata. You decide. Now we can run the denariusd docker container. docker run \ --net=host \ --name=denariusd \ -t -d \ -p 33369:33369 \ -p 32369:32369 \ -v ~/.denarius:/data \ -P buzzkillb/denariusd:latest To check the sync docker logs denariusd -f ctrl+c to exit out of that whenever Now to run electrumx server (wait to be fully sync'd). docker run \ --name=electrumx \ --net=host \ --ulimit nofile=5120:5120 \ -t -d \ -v ~/electrumx:/data \ -e DAEMON_URL=http://denariusrpc:[email protected]:32369 \ -e COIN=Denarius \ -p 50002:50002 \ buzzkillb/docker-electrumx:latest To watch these logs. docker logs electrumx -f Once running check it can be found. openssl s_client -connect electrumx1.denarius.pro:50002 Working on an easy way to do the compaction. If you stop the container and then run docker run \ --name=electrumx-compact \ --net=host \ --ulimit nofile=5120:5120 \ -t -d \ -v ~/electrumx:/data \ -e DAEMON_URL=http://denariusrpc:[email protected]:32369 \ -e COIN=Denarius \ -p 50002:50002 \ buzzkillb/docker-electrumx:dcompact This will compact the database using Denarius environment variables. With both containers electrumx and electrumx-compact both up, we can now add a cronjob to stop server, start compact, and restart server. crontab -e Run daily, this is overkill. Best to run every 14 days or less. 0 0 * * * docker stop electrumx >/dev/null 2>&1 1 0 * * * docker start electrumx-compact >/dev/null 2>&1 6 0 * * * docker start electrumx >/dev/null 2>&1
  2. This may or may not be an easier way to control your fortunastake servers. Its for sure an easy way to run more than 1 on same PC as long as that PC / raspberry pi / tablet?? / whatever can run Docker. Can also run nativetor in each container, which is an interesting way to run onion FS's. If you do this guide once, you will see why I went through so much trouble to write this out. Github is located here with the dockerfiles https://github.com/buzzkillb/denariusDocker How to install docker on ubuntu 16.04. Might be different on newer releases, disco dingo has a snap package, just putting basic install here to show what the commands are. https://docs.docker.com/install/linux/docker-ce/ubuntu/ sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io To test it installed correctly. sudo docker run hello-world modify your user account so you dont need to run sudo on the docker commands. sudo usermod -aG docker your-user Now to the good stuff. as of v3.3.9.1 denariusd creates a denarius.conf in the datadir, so we can handle this 2 ways. Either run the docker daemon and let it autocreate denarius.conf and then edit that, or just create denarius.conf before running the docker daemon. The main thing to know is that the docker daemon requires daemon=0. Setup typical denarius.conf to enable fortunastake server. typical chaindata directory is ~/.denarius but this can go anywhere. like ~/D/FS01 example denarius.conf rpcuser=USEARANDOMNAME rpcpassword=USEARANDOMPASSWORD daemon=0 port=9999 fortunastake=1 fortunastakeprivkey=6J8tAUsVchangethisofcoursehXBgfdeewqsdghySWEQEeb4XGSC251sM7bYQgEXh7 Lets run from ~/.denarius to get started. This will run the docker container of latest wallet daemon compiled from source using ubuntu 18.04 as the OS. I also created one that uses ubuntu 16.04, and one that works on armv7 devices like a raspberry pi3. For now lets use the first one I made. docker run --name=denariusd --rm -t -d -v ~/.denarius:/data -P buzzkillb/denariusd What this does is pulls and runs the docker daemon container and uses your ~/.denarius folder as the data storage. So if you shutdown the container your data isnt inside of that container and gets lost on any shutdowns. A hint: this folder is where your denarius.conf is located. change ~/.denarius to ~/D/FS01 and now you can make many if you want. Just stick a denarius.conf in FS01, FS02, FS03, etc. Some basic commands to use this. docker exec denariusd denariusd -datadir=/data getinfo docker exec denariusd denariusd -datadir=/data getbalance docker exec denariusd denariusd -datadir=/data fortunastake status To read the logs, (this is like tail -f debug.log) docker logs denariusd -f Now lets say you ran many of these containers for many fortunastakes. You would run it like this. docker run --name=FS01 --rm -t -d -v ~/D/FS01:/data -P buzzkillb/denariusd Even easier, install docker-compose https://docs.docker.com/compose/install/ and then create a directory to store a docker compose file in, like cd ~ mkdir bigd cd bigd nano docker-compose.yml Stick this in the yml file. FS01: image: buzzkillb/denariusd:latest volumes: - ~/D/FS01:/data FS02: image: buzzkillb/denariusd:latest volumes: - ~/D/FS02:/data FS03: image: buzzkillb/denariusd:latest volumes: - ~/D/FS03:/data then in that folder docker-compose up -d This will start 3 fortunastakes on the same PC. Just need about 700mb of ram per FS. I have some more examples of commands on the github link, but this should get someone started on making this a bit easier. I will build the latest daemon on these, so if you want to autoupdate whenever these happen, try out watchtower. https://github.com/containrrr/watchtower docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower This will stop the container, pull the latest, and restart from same command used to start. I am also using dozzle to watch the logs from a web browser. https://github.com/amir20/dozzle docker run --name dozzle -d --volume=/var/run/docker.sock:/var/run/docker.sock -p 8888:8080 amir20/dozzle:latest
  3. Docker can be used to run a denariusd wallet daemon. It can also run multple FortunaStakes very easily. No need to mess with compiling or downloading binaries. My github has some basics for the docker image I created. https://github.com/buzzkillb/denariusDocker First install docker on ubuntu. Don't forget to usermod your user account to run docker commands without using sudo. https://docs.docker.com/install/linux/docker-ce/ubuntu/ Once docker-ce is running lets grab my docker image. docker run --name=denariusd --rm -t -v ~/.denarius:/data -P buzzkillb/denariusd First thing we notice is that we need a denarius.conf in the ~/.denarius folder. Lets make one with what we need. nano ~/.denarius/denarius.conf rpcuser=usernamechangeme rpcpassword=passwordchangeme Save and now run the above command again. docker run --name=denariusd --rm -t -v ~/.denarius:/data -P buzzkillb/denariusd Was that easy or what? Now to run this in the background add -d flag. docker run --name=denariusd --rm -t -d -v ~/.denarius:/data -P buzzkillb/denariusd With the output not being shown. Lets watch the printtoconsole lines in the docker container. docker logs denariusd -f To list all your containers. docker ps To stop your container. docker stop denariusd You can run more than 1 container of denariusd, example below docker run --name=FS01 --rm -t -d -v ~/FS01:/data -P buzzkillb/denariusd Have fun!
  4. How to setup a compiled from source Denarius daemon docker container in Ubuntu 16.04. I setup an Ubuntu 16.04 VM using Virtual Box to start this out. Work in progress as there are a few steps and links I need to add over time. Install Docker on your host machine. https://docs.docker.com/install/linux/docker-ce/ubuntu/ create a folder to work in mkdir denarius-ubuntu First we setup the update and install dependencies files. nano Dockerfile.dev FROM ubuntu:16.04 RUN apt-get update -y && \ apt-get dist-upgrade -y && \ apt-get install -y git \ unzip \ build-essential \ libssl-dev \ libdb++-dev \ libboost-all-dev \ libqrencode-dev \ libminiupnpc-dev \ libgmp-dev \ libevent-dev \ autogen \ automake \ libtool Then we build this docker build -f Dockerfile.dev -t ubuntu-dev . Next we setup getting the source code. nano Dockerfile.build FROM ubuntu-dev RUN git clone https://github.com/carsenk/denarius Then we build this docker build -f Dockerfile.build -t denarius-ubuntu-build . Setup the compile nano Dockerfile.compile FROM denarius-ubuntu-build RUN (cd denarius && \ git checkout master && \ git pull && \ cd src && \ make -f makefile.unix ) Then we build this docker build -f Dockerfile.compile -t denarius-ubuntu-compile . Setup the move binary nano Dockerfile.install #Dockerfile.install FROM denarius-ubuntu-compile COPY --from=denarius-ubuntu-compile /denarius/src/denariusd /usr/local/bin Then we build this docker build -f Dockerfile.install -t denarius-ubuntu-bin . Setup a denarius.conf. nano denarius.conf rpcuser=RandomUserNameSy5pess55rGu9EsGF0+ZXc/RZlON41+x rpcpassword=RandomPasswordREy9PYjgNdmFdDgWmpXnsotQ42cURu4cO22xknJEXsItXkydbSa0kxcxbvt2hE+g nativetor=1 server=1 listen=1 daemon=1 Setup to move the denarius.conf and expose ports. nano Dockerfile.run #Dockerfile.run FROM denarius-ubuntu-bin # # Copy the denarius.conf file from # the build context into the container # COPY denarius.conf /root/.denarius/denarius.conf # # Expose ports for the RPC interface # EXPOSE 33369 9999 Then we build this. docker build -f Dockerfile.run -t denarius-ubuntu-run . Now we have a bunch of images, which we can see by using the command docker images. I liked the idea of running the container and linking to a directory on the host machine itself. Sample directory being ~/blockchain on the host. docker run --rm -it -d -v ~/blockchain:/root/.denarius -P denarius-ubuntu-run bash Finally if you want to remove some of the bloat and push to your own docker hub create a Dockerfile. nano Dockerfile FROM denarius-ubuntu-bin as build RUN echo "In build stage" FROM ubuntu:16.04 COPY --from=build /usr/local/bin/denariusd /usr/local/bin #Get packages and Dependencies RUN apt-get update -y && \ apt-get dist-upgrade -y && \ apt-get install -y git \ unzip \ build-essential \ libssl-dev \ libdb++-dev \ libboost-all-dev \ libqrencode-dev \ libminiupnpc-dev \ libgmp-dev \ libevent-dev \ autogen \ automake \ libtool #Pull from Source #RUN git clone https://github.com/carsenk/denarius #Compile from Source #RUN (cd denarius && \ #git checkout master && \ #git pull && \ #cd src && \ #make -f makefile.unix ) # # Copy the denarius.conf file from # the build context into the container # COPY denarius.conf /root/.denarius/denarius.conf # # Expose ports for the RPC interface # EXPOSE 33369 9999 # # Start the bitcoin server # #ENTRYPOINT ["/usr/local/bin/denariusd"] Build and commit this. A good step by step on how to push your new docker image to docker hub. https://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html
  5. Location of script. https://github.com/buzzkillb/denariuscoin-Dockerfiles Run this on a VPS bash -c "$(wget -O - https://raw.githubusercontent.com/buzzkillb/denariuscoin-Dockerfiles/master/createswap.sh)" && bash -c "$(wget -O - https://raw.githubusercontent.com/buzzkillb/denariuscoin-Dockerfiles/master/install.sh)" After it finishes installing. Then go to https://YOURSERVERIP After inputting the key, you are done with the VPS portion. at the command prompt type To List docker ps To enter the container. docker exec -it denariuscoinmasternode bash Sample commands /root/.denarius/denariusd getinfo /root/.denarius/denariusd masternode status
  • Create New...