mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-14 10:37:43 -07:00
Fix docker compose invocation
1. Make sure we don't call docker-compose if 'docker compose' is available 2. Automatically build the container (will be cached by docker, so no overhead) (fixes #140) Signed-off-by: Parth Thakkar <thakkarparth007@gmail.com>
This commit is contained in:
parent
4441e5e16b
commit
99e41d7005
1 changed files with 7 additions and 2 deletions
|
@ -31,5 +31,10 @@ while getopts "hd" option; do
|
|||
esac
|
||||
done
|
||||
|
||||
# On newer versions, docker-compose is docker compose
|
||||
docker compose up $options --remove-orphans || docker-compose up $options --remove-orphans
|
||||
# On versions above 20.10.2, docker-compose is docker compose
|
||||
smaller=$(printf "$(docker --version | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')\n20.10.2" | sort -V | head -n1)
|
||||
if [[ "$smaller" == "20.10.2" ]]; then
|
||||
docker compose up $options --remove-orphans --build
|
||||
else
|
||||
docker-compose up $options --remove-orphans --build
|
||||
fi;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue