Skip to content

Running the Docker Image

Thomas edited this page Jun 12, 2018 · 17 revisions

Running the Docker Image

  • If using the local Devnet, follow these instructions to start that image.
  • If connecting to an Ethereum client, make sure that is running first with websocket enabled.

Download the latest version:

$ docker pull smartcontract/chainlink:latest

Create a persistent volume:

docker volume create --name chainlink

Create an environment file and populate with your variables, for example:

$ touch /home/$USER/.env

And populate it with values. You will need to change the ETH_CHAIN_ID to the network you're connecting to and the CLIENT_NODE_URL to the IP that Docker gives you.

ROOT=/chainlink
LOG_LEVEL=debug
ETH_URL=ws://172.17.0.1:18546
CLIENT_NODE_URL=http://172.17.0.3:6688
ETH_CHAIN_ID=3
TX_MIN_CONFIRMATIONS=2
TASK_MIN_CONFIRMATIONS=0
LINK_CONTRACT_ADDRESS=0x20fe562d797a42dcb3399062ae9546cd06f63280

Now you can run the Docker image:

$ docker run -v chainlink:/chainlink -it --env-file=/home/$USER/.env smartcontract/chainlink n

In a new window, you can interact with the Docker instance by using the command-line API. For example:

$ docker run -it --env-file=/home/$USER/.env smartcontract/chainlink j