diff --git a/Docker/setups/default/docker-compose.yml b/Docker/setups/default/docker-compose.yml index 3d7f282..4ce2cc3 100644 --- a/Docker/setups/default/docker-compose.yml +++ b/Docker/setups/default/docker-compose.yml @@ -23,16 +23,13 @@ x-zeek-controller: &ZEEK_CONTROLLER services: controller: - <<: *ZEEK_BASE - <<: *ZEEK_CONTROLLER + <<: [*ZEEK_BASE, *ZEEK_CONTROLLER] inst1: - <<: *ZEEK_BASE - <<: *ZEEK_AGENT + <<: [*ZEEK_BASE, *ZEEK_AGENT] inst2: - <<: *ZEEK_BASE - <<: *ZEEK_AGENT + <<: [*ZEEK_BASE, *ZEEK_AGENT] client: image: zeektest:latest diff --git a/Docker/setups/singlehost/docker-compose.yml b/Docker/setups/singlehost/docker-compose.yml index 7e0cdc2..3ee9a2b 100644 --- a/Docker/setups/singlehost/docker-compose.yml +++ b/Docker/setups/singlehost/docker-compose.yml @@ -29,9 +29,7 @@ x-zeek-client: &ZEEK_CLIENT services: controller: - <<: *ZEEK_BASE - <<: *ZEEK_CONTROLLER + <<: [*ZEEK_BASE, *ZEEK_CONTROLLER] client: - <<: *ZEEK_BASE - <<: *ZEEK_CLIENT + <<: [*ZEEK_BASE, *ZEEK_CLIENT] diff --git a/Scripts/docker-compose-teardown b/Scripts/docker-compose-teardown index 4590c79..bf80839 100755 --- a/Scripts/docker-compose-teardown +++ b/Scripts/docker-compose-teardown @@ -12,7 +12,7 @@ if docker ps -a | grep -q $controller; then fi # Grab the Docker logs -docker-compose -p ${testname}_ -f docker-compose.yml logs >docker-compose.logs +docker compose -p ${testname}_ -f docker-compose.yml logs >docker-compose.logs [ -n "$TEST_SKIP_DOCKER_TEARDOWN" ] && exit 0 [ "$TEST_FAILED" -eq 1 ] && [ -n "$TEST_SKIP_DOCKER_TEARDOWN_ON_FAILURE" ] && exit 0 @@ -28,6 +28,6 @@ if [ ! -f docker-compose.yml ]; then fi # Don't wait at all for clean container shutdown -docker-compose -p ${testname}_ -f docker-compose.yml down -t 0 +docker compose -p ${testname}_ -f docker-compose.yml down -t 0 exit 0 diff --git a/Scripts/docker-requirements b/Scripts/docker-requirements index a871c8c..a5355ed 100755 --- a/Scripts/docker-requirements +++ b/Scripts/docker-requirements @@ -11,8 +11,8 @@ command -v docker >/dev/null || { exit 1 } -command -v docker-compose >/dev/null || { - echo "docker-compose command unavailable" +docker compose version >/dev/null || { + echo "docker compose plugin unavailable" exit 1 } diff --git a/Scripts/docker-setup b/Scripts/docker-setup index 2d502ac..f123dba 100644 --- a/Scripts/docker-setup +++ b/Scripts/docker-setup @@ -46,16 +46,16 @@ docker_populate() { fi } -# The corresponding "docker-compose down" happens in docker-compose-teardown. +# The corresponding "docker compose down" happens in docker-compose-teardown. # Might shift this around in the future for better symmetry. docker_compose_up() { local config1="${1:-docker-compose.yml}" local config2="${2:-docker-compose.override.yml}" if [ -f "${config2}" ]; then - docker-compose -p ${testname} -f "$config1" -f "$config2" up -d + docker compose -p ${testname} -f "$config1" -f "$config2" up -d else - docker-compose -p ${testname} -f "$config1" up -d + docker compose -p ${testname} -f "$config1" up -d fi }