- Backup Dockerfiles
- Setup Jenkins pipeline to create AionR Docker images, test them and push them to Docker hub automatically
- 2 Dockerfiles to build AionR execution environment for ub18.04, ub16.04
- 2 Dockerfiles to build the images contains the latest AionR package
- Jenkinfile to build images and push them into docker hub or other image storage system
- A shell script to trigger the testing
- The work directory of docker images is /aionr. The structure is the same as the executable package
- The runing data is located at /root/.aion. Mounting a volume or binding a host space to this directory is recommended.
- Default Command is launching AionR to connect to Mainnet
- Expose Ports:
- 30303 (P2P)
- 8545 (RPC HTTP)
- 8546 (RPC WebSocket)
- 8547 (Wallet)
- 8008 (Stratum)
- Download the executiable package
- Or Build from Source Code
- Then put the package folder in this repo
docker build --file <DockerfileName> --build-arg PACKAGE_LOCATION=<new built AionR package Location> -t <imageRepo:tag> .
- A new Jenkinsfile will be added to AionR repo for release purpose. The last step of the new pipeline is to trigger the image building and passing the current kernel version.
- Test Image using JSON RPC requests,the entire test frame is /chaion/qa-rpc repo
- The pipeline tests both HTTP and WebSocket.
- It pushes the image to Docker Hub after testing completed
Prerequisite: Docker
- Use the dockerfile, check Manual Build Image
- Pull from Docker Hub:
docker pull aionnetworkdocker/aionr:0.1.1
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 aionnetworkdocker/aionr:0.1.1
- Run container with custom/mastery network
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 aionnetworkdocker/aionr:0.1.1 ./mastery.sh
- To mount a volume or host directory to the Container
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 --mount src=/host/dir/path/or/volumn/name,dst=/container/dir/path aionnetworkdocker/aionr:0.1.1
For example:
- create a volume and mount it with aionr data directory:
docker create volume aionrdata
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 --mount type=volume,src=aionrdata,dst=/root/.aion aionnetworkdocker/aionr:0.1.1
- bind a host directory with aionr data directory:
# /host/location must be existed
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 --mount type=bind,src=/host/location,dst=/root/.aion aionnetworkdocker/aionr:0.1.1
# Or /host/location does not have to be existed
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 -v /host/location:/root/.aion aionnetworkdocker/aionr:0.1.1
To check the structure of /root/.aion
, go AionR Wiki page
After the container is running, users can edit the configuration of each network through docker exec
docker exec -it <container_name or hash> /bin/bash
Then edit [NETWORK]\[NETWORK].toml
In some cases, users want to use the configuration and genesis file in the host. Users can mount a host directory that contains [NETWORK].toml
and [NETWORK].json
.
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 \
--mount type=bind,src=/host/db,dst=/root/.aion \
--mount type=bind,src=/host/mainnet,dst=/aionr/mainnet \
aionnetworkdocker/aionr:0.1.1
If there is no configuration file and genesis file in the host,
- use
docker cp
to get the default configurations and genesis files from the docker container:
# 1. launch a container using aionnetworkdocker/aionr:0.1.1
docker run -d --name aionr aionnetworkdocker/aionr:0.1.1
# 2. cp the folders to the host
docker cp aionr:/aionr/mainnet /host/mainnet/directory
docker cp aionr:/aionr/mastery /host/mastery/directory
docker cp aionr:/aionr/custom /host/custom/directory
# 3. stop and remove the container
docker stop aionr
docker rm aionr
# 4. edit configuration on the host and launch the container again
docker run -p 30303:30303 -p 8545:8545 -p 8546:8546 -p 8547:8547 -p 8008:8008 \
--mount type=bind,src=/host/db,dst=/root/.aion \
--mount type=bind,src=/host/mainnet/directory,dst=/aionr/mainnet \
aionnetworkdocker/aionr:0.1.1
- Get the configurations in the executive package on Github