From 7bbde6fbded53e7711f59ecc0b5d01952a3a63d3 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 15:46:56 +0100 Subject: [PATCH 1/7] Try new docker compose plugin --- .github/workflows/soroban-rpc.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 312b42e47..80583fe96 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -127,11 +127,27 @@ jobs: # See https://stackoverflow.com/questions/66579446/error-executing-docker-compose-building-webserver-unable-to-prepare-context-un - name: Work around Docker Compose problem run: | - sudo pip3 install pip --upgrade - sudo pip3 install pyopenssl --upgrade - sudo pip3 install docker-compose - # Give running user docker access, needed by docker-compose - sudo gpasswd -a $(whoami) docker + sudo apt-get install docker-compose-plugin + # sudo apt-get update + # sudo apt-get install -y ca-certificates curl gnupg + + # # Install docker apt repo + # sudo install -m 0755 -d /etc/apt/keyrings + # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + # sudo chmod a+r /etc/apt/keyrings/docker.gpg + # echo \ + # "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + # "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + # sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + + + # sudo pip3 install pip --upgrade + # sudo pip3 install pyopenssl --upgrade + # sudo pip3 install docker-compose + # # Workaround for https://github.com/docker/docker-py/issues/3113 + # sudo pip3 install urllib3<2 + # # Give running user docker access, needed by docker-compose + # sudo gpasswd -a $(whoami) docker - name: Build libpreflight run: make build-libpreflight From 137d1101c4a9189f1ad75d32e96c9fa9f24bab5f Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 15:52:54 +0100 Subject: [PATCH 2/7] Ok we need to add the docker apt repo :( --- .github/workflows/soroban-rpc.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 80583fe96..3209e404b 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -127,18 +127,19 @@ jobs: # See https://stackoverflow.com/questions/66579446/error-executing-docker-compose-building-webserver-unable-to-prepare-context-un - name: Work around Docker Compose problem run: | - sudo apt-get install docker-compose-plugin - # sudo apt-get update - # sudo apt-get install -y ca-certificates curl gnupg + sudo apt-get update + sudo apt-get install -y ca-certificates curl gnupg - # # Install docker apt repo - # sudo install -m 0755 -d /etc/apt/keyrings - # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg - # sudo chmod a+r /etc/apt/keyrings/docker.gpg - # echo \ - # "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - # "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ - # sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + # Install docker apt repo + sudo install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + + sudo apt-get install docker-compose-plugin # sudo pip3 install pip --upgrade From 02dd60784707103a9162775c5cb5aaf02b65ebff Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 15:57:25 +0100 Subject: [PATCH 3/7] Need an apt-get update --- .github/workflows/soroban-rpc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 3209e404b..79f28f437 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -139,6 +139,7 @@ jobs: "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update sudo apt-get install docker-compose-plugin From 87479999950d6674814ff6e129cd6bf10b74cce0 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 16:12:46 +0100 Subject: [PATCH 4/7] Force-install docker-compose --- .github/workflows/soroban-rpc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 79f28f437..1e78aff60 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -140,7 +140,7 @@ jobs: sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update - sudo apt-get install docker-compose-plugin + sudo apt-get install -f docker-compose-plugin # sudo pip3 install pip --upgrade From ba458443286745f4451997c44cf62035565e53f4 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 16:19:30 +0100 Subject: [PATCH 5/7] Remove old docker-compose first? --- .github/workflows/soroban-rpc.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 1e78aff60..1d1c9bc51 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -140,7 +140,8 @@ jobs: sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update - sudo apt-get install -f docker-compose-plugin + sudo apt-get remove docker-compose + sudo apt-get install docker-compose-plugin # sudo pip3 install pip --upgrade From 40d5b14e4008be6f0fe75d87ba4e47693ce8f69f Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 16:25:49 +0100 Subject: [PATCH 6/7] try removing moby-compose --- .github/workflows/soroban-rpc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 1d1c9bc51..932cb02a9 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -140,8 +140,8 @@ jobs: sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update - sudo apt-get remove docker-compose - sudo apt-get install docker-compose-plugin + sudo apt-get remove -y moby-compose + sudo apt-get install -y docker-compose-plugin # sudo pip3 install pip --upgrade From 3e43c7e56b460eccb6bb9c66e8ec25224bc91b67 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 4 May 2023 16:37:40 +0100 Subject: [PATCH 7/7] Clean up workflow --- .github/workflows/soroban-rpc.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 932cb02a9..8ea25299b 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -139,18 +139,13 @@ jobs: "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + # Install docker-compose v2 from apt repo sudo apt-get update sudo apt-get remove -y moby-compose sudo apt-get install -y docker-compose-plugin - - # sudo pip3 install pip --upgrade - # sudo pip3 install pyopenssl --upgrade - # sudo pip3 install docker-compose - # # Workaround for https://github.com/docker/docker-py/issues/3113 - # sudo pip3 install urllib3<2 - # # Give running user docker access, needed by docker-compose - # sudo gpasswd -a $(whoami) docker + echo "Docker Compose Version:" + docker-compose version - name: Build libpreflight run: make build-libpreflight