Skip to content

Instantly share code, notes, and snippets.

@dmdeklerk
Last active February 17, 2021 13:11
Show Gist options
  • Save dmdeklerk/822f53d710a7beadad10ab9eac2404f6 to your computer and use it in GitHub Desktop.
Save dmdeklerk/822f53d710a7beadad10ab9eac2404f6 to your computer and use it in GitHub Desktop.
Some background on running HEAT on Docker

Some background on running HEAT on Docker

First of all installation of Docker is needed see here how to do that https://docs.docker.com/engine/install/

Docker usage noob level

After we've installed Docker two hidden repositories will be created on your machine usually only visible through special docker commands.

Hidden repositories that eat up space

  1. The container collection (containers stand for the memory and storage an app uses plus the base image)
  2. The images collection (the image is basically all the installed software, the binaries so to say)

Docker will keep all images and all containers around for you just so you run out of disk space faster, it's good that docker does this as having small disk drives is your own fault of course, cool people have many TB ssd disks (he he, joke mode off).

Docker also keeps all containers and images around which are not used, have crashed, are superceeded, stopped etc..

Now I hear you think. How to see these containers and images plus how to get rid of any older ones.

Seeing my containers

To see your containers we run the following command.

docker ps -a The -a flag is important here as it shows ALL containers (so also those that are down)

Seeing my images

To see your images we run the following command.

docker image ls as you will see some images can be many GB in size.

How to clean up, claim back space

Various ways exist. One is docker rm command another is docker image rm

Our favorit one is to use the all in one clean up command.. docker system prune

That command will clean up all stopped containers and all 'dangling' images.

If you are really tight for space use docker system prune -a this will remove and delete as much images and containers as it can (except those that are running right now).

Heat property configuration

Some examples of how to configure your node through properties. Note that these are the commands you run on the command line (or store in a shell script for that matter.

Setting a hallmark and address

Note that we are using heatcrypto/heatledger:4.0.0 here, if you want to get up running quicker, use heatcrypto/heatledger:4.0.0_bootstrapped as it comes with a compressed blockchain included.

docker run -d -p 7733:7733 -p 7755:7755 --restart=on-failure:1 heatcrypto/heatledger:4.0.0 -properties "
heat.myHallmark=HALLMARKGOESHERE,\
heat.myAddress=ADDRESSGOESHERE,\
heat.startForging=PUT YOUR SECRET PHRASE HERE JUST LIKE THIS TEXT,\
heat.enableAPIServer=true,\
heat.enableWebsockets=true,\
heat.virtualOrdersEnabled=true,\
heat.replicatorEnabled=true,\
heat.allowedBotHosts=*,\
heat.apiServerHost=0.0.0.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment