Docker bidder
Docker Container for Bidder Node
The MEV-Commit Bidder setup leverages Docker to deploy a bidder node service within a single container, the repository can be found here . This bidder node connects to the mev-commit chain, enabling users to submit bids seamlessly. By containerizing the service, you ensure a consistent and reproducible environment, simplifying deployment and scaling.
Prerequisites
Before you begin, ensure you have the following:
-
Docker: Install Docker on your machine. You can download it from the official Docker website.
-
Docker Compose: Ensure Docker Compose is installed. It typically comes bundled with Docker Desktop, but you can verify by running docker-compose —version.
-
Afunded MEV-Commit address.
-
A valid Holesky private key for authentication. If you need funds, use the MEV-Commit faucet.
Setup Instructions
Follow these steps to set up and run your MEV-Commit bidder node.
- Clone the Repository Begin by cloning the repository to your local machine:
- Configure Environment Variables Create a .env file in the root directory of the repository to store your environment variables securely.
Create the .env file:
Define the required variables:
Open the .env file in your preferred text editor and add the following:
Replace your_private_key_here with your actual private key. The DOMAIN variable defaults to testnet.mev-commit.xyz, but you can modify it if needed.
- Build and Run Docker Containers With the environment configured, proceed to build and run the Docker containers.
This command performs the following actions:
- Builds the Docker image based on Ubuntu 20.04.
- Installs necessary dependencies such as curl and jq.
- Downloads and installs the latest MEV-Commit binary from the official repository.
- Starts the bidder node service within the container.
Customization
Tailor the bidder node to fit your specific needs by adjusting environment variables or modifying the startup script.
Modifying the Entry Point
The container uses an entrypoint.sh script to initiate the bidder service. If you need to alter the startup sequence:
Edit the entrypoint.sh script:
Locate and open the entrypoint.sh file in the repository. Make your desired changes to customize the startup behavior.
Rebuild the Docker Image:
After modifying the script, rebuild the Docker image to apply the changes:
Networking with Other Repositories
Before deploying your containers, create a shared Docker network:
This network, named app-network, facilitates communication between the bidder node and other services.
Using the Network with Other Containers
To enable other Docker services to communicate with the MEV-Commit bidder node, ensure they reference the same app-network. Here’s how to configure another repository’s docker-compose.yml to join the network: