diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1980470..bee3d6e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -8,11 +8,11 @@ ENV AVALANCHEGO_PLUGIN_PATH=$GOPATH/src/github.com/ava-labs/avalanchego/build/pl # Download AvalancheGo Binary WORKDIR / COPY ./scripts/versions.sh / -COPY ./.devcontainer/install.sh / +COPY ./.devcontainer/install_avalanchego.sh / ENV AVALANCHEGO_EXEC_PATH=/avalanchego -RUN bash -c "source ./install.sh" +RUN bash -c "source ./install_avalanchego.sh" # Install Node.js and npm using the official Node.js image RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs diff --git a/.devcontainer/install.sh b/.devcontainer/install_avalanchego.sh similarity index 89% rename from .devcontainer/install.sh rename to .devcontainer/install_avalanchego.sh index 25bbaac..6be8655 100644 --- a/.devcontainer/install.sh +++ b/.devcontainer/install_avalanchego.sh @@ -1,6 +1,5 @@ #!/bin/bash # Pulls latest pre-built node binary from GitHub -# Context of container, NOT local workspace #stop on errors set -e @@ -60,6 +59,7 @@ else exit fi +# Define architecture foundArch="$(uname -m)" if [ "$foundArch" = "aarch64" ]; then @@ -80,14 +80,8 @@ fi # Import environment variables source ./versions.sh -echo $AVALANCHEGO_VERSION -echo $getArch -echo "PRINTED AGO VERSION!" # Download AvalancheGo binary -echo "https://github.com/ava-labs/avalanchego/releases/download/$AVALANCHEGO_VERSION/avalanchego-linux-$getArch-$AVALANCHEGO_VERSION.tar.gz" curl -LJ -o avalanchego.tar.gz "https://github.com/ava-labs/avalanchego/releases/download/$AVALANCHEGO_VERSION/avalanchego-linux-$getArch-$AVALANCHEGO_VERSION.tar.gz" -echo "DOWNLOADED TAR FILE" tar -xzf avalanchego.tar.gz --wildcards '*/avalanchego' --strip-components=1 -C /avalanchego -echo "TARRED THE FILE!" rm avalanchego.tar.gz