From ccbadf5618ec780c609d83fda2f071007d439b05 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Tue, 18 Jun 2024 13:19:34 +0200 Subject: [PATCH] script fixes --- .github/workflows/manual-deploy-testnet-l2.yml | 2 +- tools/edbconnect/edb-connect.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index a89ed650ef..93e3ba6635 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -226,7 +226,7 @@ jobs: && git clone --depth 1 -b ${{ env.BRANCH_NAME }} https://github.com/ten-protocol/go-ten.git /home/obscuro/go-obscuro \ && cp /home/obscuro/go-obscuro/tools/edbconnect/edb-connect.sh /home/obscurouser/edb-connect.sh \ && chown obscurouser:obscurouser /home/obscurouser/edb-connect.sh \ - && chmod u+x /home/obscurouser/edb-connect.sh' \ + && chmod u+x /home/obscurouser/edb-connect.sh \ && docker network create --driver bridge node_network || true \ && docker run -d --name datadog-agent \ --network node_network \ diff --git a/tools/edbconnect/edb-connect.sh b/tools/edbconnect/edb-connect.sh index 6b69ff82f9..37d14c740a 100644 --- a/tools/edbconnect/edb-connect.sh +++ b/tools/edbconnect/edb-connect.sh @@ -13,10 +13,10 @@ COMMAND="ego run /home/ten/go-ten/tools/edbconnect/main/main" # Function to destroy exited containers matching the base name destroy_exited_containers() { - exited_containers=$(docker ps -a -q -f name=${CONTAINER_BASE_NAME} -f status=exited) + exited_containers=$(sudo docker ps -a -q -f name=${CONTAINER_BASE_NAME} -f status=exited) if [ "$exited_containers" ];then echo "Removing exited containers matching ${CONTAINER_BASE_NAME}..." - docker rm $exited_containers || true + sudo docker rm $exited_containers || true else echo "No exited containers to remove." fi @@ -27,11 +27,11 @@ destroy_exited_containers # Pull the latest image from Azure Docker repository echo "Pulling the latest Docker image..." -docker pull $IMAGE_NAME +sudo docker pull $IMAGE_NAME # Run the container with the specified command echo "Running the new container with name ${CONTAINER_NAME}..." -docker run --name $CONTAINER_NAME \ +sudo docker run --name $CONTAINER_NAME \ --network $NETWORK_NAME \ -v $VOLUME_NAME:/enclavedata \ --device $SGX_ENCLAVE_DEVICE:$SGX_ENCLAVE_DEVICE:rwm \ @@ -40,4 +40,4 @@ docker run --name $CONTAINER_NAME \ # After the REPL exits, destroy the container echo "Destroying the container ${CONTAINER_NAME} after command exits..." -docker rm $CONTAINER_NAME || true \ No newline at end of file +sudo docker rm $CONTAINER_NAME || true \ No newline at end of file