This document is designed to help you troubleshoot common issues when setting up Docker for this project. Follow the steps below to ensure your environment is properly configured.
- 1. Rebuilding and Recreating Containers
- 2. Clearing Docker Cache
- 3. Removing Docker Volumes
- 4. Checking Container Connectivity
- 5. Ensuring Containers are Connected to the Lightning Polar Network
- 6. Other Common Issues
If you encounter issues during the development process, try rebuilding and recreating your Docker containers.
-
Rebuild the Containers Without Using Cache:
docker compose build --no-cache
-
Recreate and Rebuild Containers: Use this command to force Docker to recreate containers, which can solve issues caused by container states.
docker compose up --build --force-recreate
-
Bring Up Containers After Rebuild: If you just want to bring up the containers after a rebuild:
docker compose up --build
Clearing Docker's build cache can help solve issues related to outdated or corrupted data.
- Clear Docker Build Cache:
This will remove all unused build cache.
docker builder prune --all
Sometimes, volume issues can cause containers to behave unexpectedly. Removing and recreating the volumes might resolve these issues.
-
List Docker Volumes:
docker volume ls
-
Remove a Specific Volume:
docker volume rm <volume_name>
-
Remove All Unused Volumes:
docker volume prune -f
Warning: Removing volumes will also remove the data stored in those volumes. Ensure you have backups if necessary.
If containers are not communicating properly, ensure they are on the same network and can reach each other. For your setup, ensure that both the polar
network containers and the lightning-evm-bridge-dapp
containers are properly connected.
-
Check if the Containers are on the Same Network:
docker network inspect bridge-network OR docker network ls
If the custom network is not listed, create it manually:
docker network create bridge-network
Look under the
Containers
section to ensure all relevant containers are listed. If they are not listed, it means they are not connected to thebridge-network
network. -
Connect
lightning-evm-bridge-dapp
Containers to the Bridge Network: If you find thatlightning-evm-bridge-dapp
containers are not connected to thebridge-network
network, connect them manually:docker network connect bridge-network lightning-evm-bridge-dapp-webapp-1 docker network connect bridge-network lightning-evm-bridge-dapp-server-1 docker network connect bridge-network lightning-evm-bridge-dapp-prisma-1
-
Connect
polar
Network Containers to the Bridge Network: Similarly, ifpolar
containers are not connected, you can manually connect them:docker network connect bridge-network polar-n1-alice
-
Connect
relay-server
Containers to the Bridge Network: If you find thatrelay-server
containers are not connected to thebridge-network
network, connect them manually:docker network connect bridge-network relay-server-relay-server-1
-
Ping Between Containers: Exec into one container and ping another container to test connectivity. For example:
docker exec -it lightning-evm-bridge-dapp-webapp-1 ping polar-n1-alice docker exec -it lightning-evm-bridge-dapp-webapp-1 ping relay-server-relay-server-1
-
Check logs:
docker logs lightning-evm-bridge-dapp-prisma-1 docker logs lightning-evm-bridge-dapp-server-1 docker logs lightning-evm-bridge-dapp-webapp-1
or
docker logs polar-n1-alice
or
docker logs relay-server-relay-server-1
Examine the logs for any error messages.
- Port Conflicts: Ensure that the ports required by your containers are not in use by other services.
- Ensure all required services are running: Make sure all dependent services (e.g., databases, message brokers) are up and running before starting your container.
If you've followed these steps and are still experiencing issues, feel free to reach out for further support.