From e806e4bc414148345fb84a06834e18c62be95101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Sun, 4 Aug 2024 13:45:29 +0200 Subject: [PATCH] chore: docker compose v2 The `docker-compose` command has been replaced by `docker compose`. The "version" tag has also been deprecated in docker-compose.yml. --- .github/workflows/check.yml | 6 +++--- README.md | 7 +++++-- docker-compose.yml | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8e750e5..0e151b9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -32,11 +32,11 @@ jobs: else echo "OK $nb CVEs reported" fi - - name: check docker-compose run execution + - name: check docker compose run execution run: | expected=19 - docker-compose build - nb=$(docker-compose run --rm spectre-meltdown-checker --batch json | jq '.[]|.CVE' | wc -l) + docker compose build + nb=$(docker compose run --rm spectre-meltdown-checker --batch json | jq '.[]|.CVE' | wc -l) if [ "$nb" -ne "$expected" ]; then echo "Invalid number of CVEs reported: $nb instead of $expected" exit 1 diff --git a/README.md b/README.md index 0e13e08..95cad76 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,13 @@ sudo ./spectre-meltdown-checker.sh #### With docker-compose ```shell -docker-compose build -docker-compose run --rm spectre-meltdown-checker +docker compose build +docker compose run --rm spectre-meltdown-checker ``` +Note that on older versions of docker, `docker-compose` is a separate command, so you might +need to replace the two `docker compose` occurences above by `docker-compose`. + #### Without docker-compose ```shell diff --git a/docker-compose.yml b/docker-compose.yml index c4024d6..0314b15 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '2' - services: spectre-meltdown-checker: build: