tools/docker/README.md
The docker-compose configuration present in this directory allows to quickly run a local development environment.
You should use the script compose located in the chainlink/tools/docker directory.
To see a list of available commands, perform the following:
cd tools/docker
./compose help
.env file is used to set the environment variables for the docker-compose commands
The following env vars are used for the compose script :
WITH_OBSERVABILITY=true to enable grafana, prometheus and alertmanagerGETH_MODE=true to use geth instead of parityCHAIN_ID=<number> to specify the chainID (default is 34055 for parity and 1337 for geth)HTTPURL=<url> to specify the RPC node HTTP url (default is set if you use geth or parity)WSURL=<url> to specify the RPC node WS url (default is set if you use geth or parity)If you specify both HTTPURL and WSURL, it won't run the devnet RPC node.
for example :
CHAIN_ID=11155111 WSURL=wss://eth.sepolia HTTPURL=https://eth.sepolia ./compose dev
WITH_OBSERVABILITY=true ./compose up
Will run one node with a postgres database and by default a devnet RPC node that can be either geth or parity.
./compose dev
The chainlink node can be reached at http://localhost:6688
Credentials for logging into the operator-ui can be found here
Runs all services including two nodes with two postgres databases and by default a devnet RPC node that can be either geth or parity.
./compose up
To remove any containers, volumes, and networks related to our docker-compose setup, we can run the clean command:
./compose clean
You can use logs command to see the logs of a specific service or all services.
./compose logs node # shows the logs of the node service
./compose logs # shows the combined logs of all running services
# connect to the container by opening bash prompts
./compose connect
docker system prune
The default configuration tries to build everything in parallel. You can avoid this by clearing the Docker Compose build options.
# Use docker compose's default build configuration
export DOCKER_COMPOSE_BUILD_OPTS=""
Sometimes docker-compose does not show logging from some docker containers. This can be solved by using the docker command directly.
# List docker instances
docker ps
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 41410c9d79d8 smartcontract/chainlink "chainlink node star…" 2 minutes ago Up 2 minutes 0.0.0.0:6688->6688/tcp chainlink-node
# f7e657e101d8 smartcontract/devnet "/bin/parity --confi…" 47 hours ago Up 2 minutes 5001/tcp, 8080/tcp, 8082-8083/tcp, 8180/tcp, 8546/tcp, 30303/tcp, 0.0.0.0:8545->8545/tcp, 30303/udp parity
# Follow logs using name of container
docker logs -f chainlink-node