Open Abolfazlak opened 1 year ago
I clone Hyperledger Besu code from repo. then I changed hashing algorithm of pow from keccak to acson. then I need to run this code and create some nodes but I'm in trouble with run and create docker image of this code to run network. how can I create an image and then using of it?
Hi there - we have a graldetask that should work for this - can you try:
./gradlew distDocker
in your Besu directory. This needs to be done at the top level /besu
Let me know if this answers your question. There might be more info that is useful here: https://wiki.hyperledger.org/display/BESU/Building+from+source
To add to @non-fungible-nelson 's answer, distDocker
is the correct task, but it is going to build images as hyperledger/besu:[variant]-[version]
which you will not be able to publish to dockerhub.
An easy way to build images that are for a different docker repo you can publish to (for kubernetes usage, for example) you can pass a couple extra gradle parameters:
So, for example to build images for abolfazlak/my-super-besu
you can use:
./gradlew -PdockerOrgName=abolfazlak -PdockerArtifactName=my-super-besu distDocker
Like that you can target a docker repository you can publish to.
thanks. after running this command it gives me 7 images. what should I do for creating some nodes or adding some transactions?
@non-fungible-nelson @garyschulte could you please help me?
@non-fungible-nelson @garyschulte could you please help me?
This guide uses the main besu docker images , but should help you become more familiar with how to start and run a blockchain https://besu.hyperledger.org/stable/private-networks/tutorials/quickstart
Once you have an idea how it works, starting up my-super-besu can be as simple as running
docker run abolfazlak/my-super-besu:23.7.2-SNAPSHOT
when I run this command it will return: {"gasUser":"0x0","timens":212958,"time":212,"gasTotal":"0x0","output":"0x"} and finished.
How can I create an Image of besu core with my own changes, then run this network? I have already added the relevant changes to the code and now I am having trouble with creating docker image and running it.