From 50d5881f99e43025aeeedd4565e564463e11f66c Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 14 Dec 2023 08:44:59 -0600 Subject: [PATCH] tools/docker: add solana localnet --- tools/docker/compose | 2 +- tools/docker/config.toml | 7 +++++++ tools/docker/docker-compose.solana.yaml | 20 ++++++++++++++++++++ tools/docker/docker-compose.yaml | 4 ++++ tools/solana/Dockerfile | 8 ++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tools/docker/docker-compose.solana.yaml create mode 100644 tools/solana/Dockerfile diff --git a/tools/docker/compose b/tools/docker/compose index b16c1e19332..b899c076703 100755 --- a/tools/docker/compose +++ b/tools/docker/compose @@ -4,7 +4,7 @@ set -ex export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 -base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml" +base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml -f docker-compose.solana.yaml" # Allow for choosing between geth or parity if [ $GETH_MODE ]; then base_files="$base_files -f docker-compose.gethnet.yaml" diff --git a/tools/docker/config.toml b/tools/docker/config.toml index 23108ae295c..69ae667f423 100644 --- a/tools/docker/config.toml +++ b/tools/docker/config.toml @@ -20,3 +20,10 @@ MinContractPayment = '0.000001 link' Name = 'primary-0-34055' WSURL = 'ws://devnet:8546' HTTPURL = 'http://devnet:8545' + +[[Solana]] +ChainID = 'localnet' + +[[Solana.Nodes]] +Name = 'sol-node' +URL = 'http://solana:8899' diff --git a/tools/docker/docker-compose.solana.yaml b/tools/docker/docker-compose.solana.yaml new file mode 100644 index 00000000000..e7bbaae1cb0 --- /dev/null +++ b/tools/docker/docker-compose.solana.yaml @@ -0,0 +1,20 @@ +version: '3.5' + +services: + node: + depends_on: + - solana + node-2: + depends_on: + - solana + solana: + build: ../solana + container_name: solana + image: smartcontract/solana + ports: + - 8899 + - 8900 + volumes: + - solana-db-data:/solana/database +volumes: + solana-db-data: diff --git a/tools/docker/docker-compose.yaml b/tools/docker/docker-compose.yaml index c01d3579356..511d2042525 100644 --- a/tools/docker/docker-compose.yaml +++ b/tools/docker/docker-compose.yaml @@ -14,6 +14,8 @@ services: restart: always environment: - CL_DATABASE_URL +# - CL_SOLANA_CMD=chainlink-solana +# - CL_MEDIAN_CMD=chainlink-median env_file: - chainlink-variables.env ports: @@ -34,6 +36,8 @@ services: restart: always environment: - CL_DATABASE_URL +# - CL_SOLANA_CMD=chainlink-solana +# - CL_MEDIAN_CMD=chainlink-median env_file: - chainlink-variables.env ports: diff --git a/tools/solana/Dockerfile b/tools/solana/Dockerfile new file mode 100644 index 00000000000..7cbd235c1f5 --- /dev/null +++ b/tools/solana/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:20.04 +WORKDIR /solana + +ADD https://github.com/solana-labs/solana/releases/download/v1.16.23/solana-release-x86_64-unknown-linux-gnu.tar.bz2 . +RUN tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2 +ENV PATH=/solana/solana-release/bin:$PATH + +ENTRYPOINT [ "solana-test-validator" ]