diff --git a/project/DockerComposePlugin.scala b/project/DockerComposePlugin.scala index 25e3adac..5ed0dbbc 100644 --- a/project/DockerComposePlugin.scala +++ b/project/DockerComposePlugin.scala @@ -36,7 +36,7 @@ object DockerComposePlugin extends AutoPlugin { .task { val log = sbt.Keys.streams.value.log val cmd = - s"docker-compose -f ${composeFile.value} up -d " + s"docker compose -f ${composeFile.value} up -d " log.info(s"Running $cmd") val res = Process( cmd, @@ -46,7 +46,7 @@ object DockerComposePlugin extends AutoPlugin { "COMPOSE_PROJECT_NAME" -> composeProjectName.value ).! if (res != 0) - throw new IllegalStateException(s"docker-compose up returned $res") + throw new IllegalStateException(s"docker compose up returned $res") } .dependsOn(createNetworkTask) @@ -60,7 +60,7 @@ object DockerComposePlugin extends AutoPlugin { val dockerComposeKillTask: Def.Initialize[Task[Unit]] = Def.task { val log = sbt.Keys.streams.value.log - val cmd = s"docker-compose -f ${composeFile.value} kill -s 9" + val cmd = s"docker compose -f ${composeFile.value} kill -s 9" log.info(s"Running $cmd") val res = Process( cmd, @@ -70,12 +70,12 @@ object DockerComposePlugin extends AutoPlugin { "COMPOSE_PROJECT_NAME" -> composeProjectName.value ).! if (res != 0) - throw new IllegalStateException(s"docker-compose kill returned $res") + throw new IllegalStateException(s"docker compose kill returned $res") } val dockerComposeDownBaseTask: Def.Initialize[Task[Unit]] = Def.task { val log = sbt.Keys.streams.value.log - val cmd = s"docker-compose -f ${composeFile.value} down -v" + val cmd = s"docker compose -f ${composeFile.value} down -v" log.info(s"Running $cmd") val res = Process( cmd, @@ -85,7 +85,7 @@ object DockerComposePlugin extends AutoPlugin { "COMPOSE_PROJECT_NAME" -> composeProjectName.value ).! if (res != 0) - throw new IllegalStateException(s"docker-compose down returned $res") + throw new IllegalStateException(s"docker compose down returned $res") } val dockerComposeDownTask: Def.Initialize[Task[Unit]] = @@ -101,7 +101,7 @@ object DockerComposePlugin extends AutoPlugin { val dockerComposeLogsTask: Def.Initialize[Task[Unit]] = Def.task { val log = sbt.Keys.streams.value.log val cmd = - s"docker-compose -f ${composeFile.value} logs" + s"docker compose -f ${composeFile.value} logs" log.info(s"Running $cmd") val res = Process( cmd, @@ -111,13 +111,13 @@ object DockerComposePlugin extends AutoPlugin { "COMPOSE_PROJECT_NAME" -> composeProjectName.value ).! if (res != 0) - throw new IllegalStateException(s"docker-compose logs returned $res") + throw new IllegalStateException(s"docker compose logs returned $res") } val dockerComposePsTask: Def.Initialize[Task[Unit]] = Def.task { val log = sbt.Keys.streams.value.log val cmd = - s"docker-compose -f ${composeFile.value} ps -a" + s"docker compose -f ${composeFile.value} ps -a" log.info(s"Running $cmd") val res = Process( cmd, @@ -127,7 +127,7 @@ object DockerComposePlugin extends AutoPlugin { "COMPOSE_PROJECT_NAME" -> composeProjectName.value ).! if (res != 0) - throw new IllegalStateException(s"docker-compose ps -a returned $res") + throw new IllegalStateException(s"docker compose ps -a returned $res") } def settings( @@ -155,12 +155,12 @@ object DockerComposePlugin extends AutoPlugin { object DockerComposePluginKeys { val composeFileLocation = - settingKey[String]("Path to docker-compose files, e.g. docker/") + settingKey[String]("Path to docker compose files, e.g. docker/") val composeFileName = settingKey[String]("File name of the compose file, e.g. docker-compose.yml") val networkName = settingKey[String]("Name of network to create") val composeProjectName = - settingKey[String]("Name of project for docker-compose.") + settingKey[String]("Name of project for docker compose.") val buildImage = settingKey[Boolean]( "Determines if dockerComposeUp should also build a docker image via the DockerImagePlugin" ) @@ -171,16 +171,16 @@ object DockerComposePluginKeys { taskKey[Unit]("Brings up docker, runs 'test', brings down docker") val dockerComposeUp = taskKey[Unit]( - "Builds the images and then runs `docker-compose -f up -d` for the scope" + "Builds the images and then runs `docker compose -f up -d` for the scope" ) val dockerComposeDown = - taskKey[Unit]("Runs `docker-compose -f down` for the scope") + taskKey[Unit]("Runs `docker compose -f down` for the scope") val dockerComposeRestart = taskKey[Unit]( - "Runs `docker-compose -f down` and `docker-compose -f up` for the scope" + "Runs `docker compose -f down` and `docker compose -f up` for the scope" ) val dockerComposeLogs = - taskKey[Unit]("Runs `docker-compose -f logs` for the scope") + taskKey[Unit]("Runs `docker compose -f logs` for the scope") val dockerComposePs = - taskKey[Unit]("Runs `docker-compose -f ps -a` for the scope") + taskKey[Unit]("Runs `docker compose -f ps -a` for the scope") }