From f3048d82802f19a5c010922b234ac1b7e6318f5b Mon Sep 17 00:00:00 2001 From: Aaron Kuehler Date: Tue, 31 Dec 2024 08:10:01 -0500 Subject: [PATCH] Fix command not found in helper scripts (#196) The functionally previously provided by docker-compose has been baked into the docker CLI and docker-compose is no longer shipped with the Docker for Desktop application bundle. When running this project's helper scripts on recent version of docker / Docker for Desktop the docker-compose command is not found: ``` $ bin/bootstrap bin/cleanup: line 3: docker-compose: command not found bin/bootstrap: line 4: docker-compose: command not found ``` --- README.md | 6 +++--- bin/bootstrap | 2 +- bin/cleanup | 2 +- bin/console | 2 +- bin/deps | 2 +- bin/shell | 2 +- bin/start | 2 +- bin/stop | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index df1cca9..3fcd020 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 1. [OSX](#org5118f49) 2. [Debian/Ubuntu Linux](#org7168fc9) 2. [Getting Started](#org76343d4) -3. [Working with Rails and `docker-compose`](#org23b1de9) +3. [Working with Rails and `docker compose`](#org23b1de9) 1. [Bootstrapping the application](#org52fd95d) 2. [Installing application dependencies](#orge7ed08d) 3. [Obtaining a shell](#org422384f) @@ -55,14 +55,14 @@ Via [homebrew](https://brew.sh/) -# Working with Rails and `docker-compose` +# Working with Rails and `docker compose` All of the dependencies to build and run the rails application are included in the `web` service's image - named `power-web-development-interview_web`. To run typical `bin/rails` commands inside the container use the general form: - docker-compose run --rm web bash -lc "" + docker compose run --rm web bash -lc "" We've provided binstubs for common tasks as a convenience: diff --git a/bin/bootstrap b/bin/bootstrap index c720f97..f9e945b 100755 --- a/bin/bootstrap +++ b/bin/bootstrap @@ -1,4 +1,4 @@ #!/usr/bin/env sh bin/cleanup -docker-compose run --rm web bash -lc "bin/setup" +docker compose run --rm web bash -lc "bin/setup" diff --git a/bin/cleanup b/bin/cleanup index 0b923d2..aa56c95 100755 --- a/bin/cleanup +++ b/bin/cleanup @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose down --rmi=all --volumes +docker compose down --rmi=all --volumes diff --git a/bin/console b/bin/console index 26fc799..6d9a10c 100755 --- a/bin/console +++ b/bin/console @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose run --rm web bash -lc "bin/rails console" +docker compose run --rm web bash -lc "bin/rails console" diff --git a/bin/deps b/bin/deps index 4669d8f..a9e2624 100755 --- a/bin/deps +++ b/bin/deps @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose run --rm web bash -lc "(bin/bundle check || bin/bundle install) && (bin/yarn check || bin/yarn install)" +docker compose run --rm web bash -lc "(bin/bundle check || bin/bundle install) && (bin/yarn check || bin/yarn install)" diff --git a/bin/shell b/bin/shell index 88cecd9..35e924f 100755 --- a/bin/shell +++ b/bin/shell @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose run --rm web bash -l +docker compose run --rm web bash -l diff --git a/bin/start b/bin/start index c8c8f97..29f3f48 100755 --- a/bin/start +++ b/bin/start @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose up web +docker compose up web diff --git a/bin/stop b/bin/stop index 41630e6..6fd1a12 100755 --- a/bin/stop +++ b/bin/stop @@ -1,3 +1,3 @@ #!/usr/bin/env sh -docker-compose stop +docker compose stop