Skip to content

Commit 06e8914

Browse files
committed
update readme
1 parent da8c06d commit 06e8914

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ Please ensure you have the latest versions of Docker and Docker Compose installe
4242
- Docker: [Install Docker on Linux](https://docs.docker.com/desktop/setup/install/linux/)
4343
- Docker Compose standalone: [Install Docker Compose on Linux](https://docs.docker.com/compose/install/standalone/)
4444

45+
## Official Docker image
46+
There are two official Docker images for java-tron:
47+
48+
- `tronprotocol/java-tron`: This image is based on the official [java-tron](https://github.com/tronprotocol/java-tron) repository, used for the Mainnet, and mostly can be used for the Nile testnet too. (**All the demo in this repository are based on this image**)
49+
- `tronnile/java-tron`: This image is based on the [nile-testnet](https://github.com/tron-nile-testnet/nile-testnet) repository which is forked from [java-tron](https://github.com/tronprotocol/java-tron). You need to use this image for the Nile testnet when there is new test release from java-tron and before it was released, especially for the hard fork test on Nile. Information about code release of the Nile testnet, please refer to this [website](https://nileex.io/).
50+
4551
## Quick Start
4652
To quickly start a java-tron node that connects to the Mainnet, simply use the following Docker command:
4753

tools/docker/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,29 @@ tronprotocol/java-tron 1.0.0 76702facd55e 23 seconds ago 549MB
3030

3131
### What ./gradlew sourceDocker do?
3232

33-
It will trigger the execution of `task sourceDocker` in [build.gradle](build.gradle). Reviewing the logic, `task sourceDocker` essentially copies the Dockerfile and shell script to a build directory, then runs the docker build. From the logic, you can run `./gradlew sourceDocker` with customised `dockerOrgName`, `dockerArtifactName`, and `release.releaseVersion`.
33+
It will trigger the execution of `task sourceDocker` in [build.gradle](build.gradle). Reviewing the logic, `task sourceDocker` essentially copies the Dockerfile and shell script to a build directory, then runs the docker build. From the logic, you can run `./gradlew sourceDocker` with customised `dockerOrgName`, `dockerArtifactName`, `release.releaseVersion` and `network`.
3434

3535
For example:
36+
```sh
37+
# build java-tron image with customised dockerOrgName, dockerArtifactName and release.releaseVersion
38+
./gradlew --no-daemon sourceDocker -PdockerOrgName=YourOrgName -PdockerArtifactName=ArtifactName -Prelease.releaseVersion=V1.1.0
39+
40+
# build java-tron docker image for nile testnet with specified org, artifact and version.
41+
# Using code from https://github.com/tron-nile-testnet/nile-testnet.git
42+
./gradlew --no-daemon sourceDocker -PdockerOrgName=YourOrgName -PdockerArtifactName=ArtifactName -Prelease.releaseVersion=V1.1.0 -Pnetwork=nile
3643
```
37-
./gradlew --no-daemon sourceDocker -PdockerOrgName=yourOrgName -PdockerArtifactName=test -Prelease.releaseVersion=V1.1.0
38-
```
44+
3945
## Test image
4046

4147
Test the java-tron image use the command below.
42-
```
48+
``` ssh
4349
./gradlew --no-daemon testDocker
50+
51+
# test image with customised dockerOrgName, dockerArtifactName and release.releaseVersion
52+
./gradlew --no-daemon testDocker -PdockerOrgName=YourOrgName -PdockerArtifactName=ArtifactName -Prelease.releaseVersion=V1.1.0
53+
54+
# test image for nile testnet with specified org, artifact and version.
55+
./gradlew --no-daemon testDocker -PdockerOrgName=YourOrgName -PdockerArtifactName=ArtifactName -Prelease.releaseVersion=V1.1.0 -Pnetwork=nile
4456
```
4557
This will trigger the execution of `task testDocker` in [build.gradle](build.gradle). According to this logic, it will run the [test.sh](test.sh) script with the parameter of the Docker image name.
4658

0 commit comments

Comments
 (0)