This repository provides a setup.sh script to automate the setup of T3rn executor instances using Docker.
Before running the setup script, ensure you have the following prerequisites:
- A Unix-based operating system (Linux or macOS is preferred)
wget- for downloading the setup scriptchmod- for changing file permissionsbash- the script is written in Bash- Basic understanding of Docker - the script will install Docker if it's not already present
Before running the setup.sh script, you need to create a private_keys.txt file in the same directory as the script. This file should contain the private keys, one per line.
-
Download the
setup.shscriptUse
wgetto download thesetup.shscript from the repository:wget https://raw.githubusercontent.com/ade1256/t3rn-executor-transaction-validator/main/setup.sh
-
Make the script executable
Change the file permissions to make the script executable:
chmod +x setup.sh
-
Run the
setup.shscriptExecute the script to start the setup process:
./setup.shThis script will:
- Install Docker if it is not already installed
- Download and unpack the T3rn executor binary
- Create a Docker image using a Dockerfile
- Start Docker containers for each private key listed in
private_keys.txt
After running the setup.sh script, you can use the following Docker commands to manage your containers:
-
List Running Containers
docker ps -
View Logs
Replace
<container_name>with the name of the Docker container you want to view logs for:docker logs <container_name> -
Stop a Running Container
Replace
<container_name>with the name of the Docker container you want to stop:docker stop <container_name> -
Remove a Container
Replace
<container_name>with the name of the Docker container you want to remove:docker rm <container_name> -
Remove an Image
Replace
<image_name>with the name of the Docker image you want to remove:docker rmi <image_name>
For more details on Docker commands and usage, refer to the official Docker documentation.