diff --git a/docker/testnet.dockerfile b/docker/testnet.dockerfile index 22968f6b..172fdf23 100644 --- a/docker/testnet.dockerfile +++ b/docker/testnet.dockerfile @@ -26,7 +26,7 @@ RUN apt-get update && apt-get install -y \ pkg-config \ libssl-dev \ sudo \ - git + git RUN apt-get install -y libclang-dev @@ -44,9 +44,29 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ RUN node --version RUN npm --version +RUN apt-get update && apt-get install -y unzip +# Install protoc +# Determine architecture and download appropriate version of protoc +ARG PROTOC_VERSION=3.15.8 +RUN ARCH=$(dpkg --print-architecture) && \ + if [ "$ARCH" = "amd64" ]; then \ + PROTOC_ARCH="linux-x86_64"; \ + elif [ "$ARCH" = "arm64" ]; then \ + PROTOC_ARCH="linux-aarch_64"; \ + else \ + echo "Unsupported architecture: $ARCH"; exit 1; \ + fi && \ + curl -fSsL -o protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_ARCH}.zip" \ + && unzip protoc.zip -d /usr/local \ + && rm protoc.zip + +# Verify protoc installation +RUN protoc --version + # Download the script RUN curl -fSsL -o install.sh https://raw.githubusercontent.com/movemntdev/M1/main/scripts/install.sh + # Make the script executable RUN chmod +x install.sh diff --git a/movement-sdk/services/src/m1/testnet.rs b/movement-sdk/services/src/m1/testnet.rs index c5eb7685..ee42fae5 100644 --- a/movement-sdk/services/src/m1/testnet.rs +++ b/movement-sdk/services/src/m1/testnet.rs @@ -29,7 +29,7 @@ impl ConstructorOperations for Constructor { r#" set -e echo $MOVEMENT_DIR - $MOVEMENT_DIR/bin/avalanchego --network-id=fuji --track-subnets=$(cat $MOVEMENT_DIR/rsc/testnet-id) --plugin-dir=$MOVEMENT_DIR/avalanchego/plugins + $MOVEMENT_DIR/bin/avalanchego --network-id=fuji --track-subnets=$(cat $MOVEMENT_DIR/rsc/testnet-id) --plugin-dir=$MOVEMENT_DIR/avalanchego/plugins --http-host=0.0.0.0 "#.to_string(), vec![ testnet::Constructor::default_with_version( diff --git a/playground/remote/localnet/docker-compose.yml b/playground/remote/localnet/docker-compose.yml new file mode 100644 index 00000000..fbd086dd --- /dev/null +++ b/playground/remote/localnet/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3.8' +services: + localnet: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "localnet"] + ports: + - "9650:9650" + + proxy: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "proxy", "--base-url", "http://localnet:9650"] + ports: + - "3001:3001" + + mevm: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "mevm", "--node-url", "http://proxy:3001" ] + ports: + - "3044:3044" + \ No newline at end of file diff --git a/playground/remote/testnet/docker-compose.yml b/playground/remote/testnet/docker-compose.yml new file mode 100644 index 00000000..5c0a43d0 --- /dev/null +++ b/playground/remote/testnet/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3.8' +services: + fuji: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "testnet"] + ports: + - "9650:9650" + + proxy: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "proxy", "--base-url", "http://localnet:9650"] + ports: + - "3001:3001" + + mevm: + image: mvlbs/m1-testnet + command: ["/root/.movement/bin/movement", "ctl", "start", "m1", "mevm", "--node-url", "http://proxy:3001" ] + ports: + - "3044:3044" + \ No newline at end of file