Open kahnwong opened 1 month ago
forgot to update the actual compose command, will create a commit for it
hi @kahnwong Thank you for your contribution to this PR. @unknowntpo Please help review this PR If you have time, Thanks.
Thank you both for the comments.
I agree that it should be docker compose
syntax, in that case I will do following:
fix: use compose v2 syntax
main/master
and replace docker-compose
with docker compose
Is there anything I'm missing?
I propose this version of launch-playground.sh
# redacted shebang and license
playground_dir="$(dirname "${BASH_SOURCE-$0}")"
playground_dir="$(cd "${playground_dir}">/dev/null; pwd)"
# check for `docker compose`
isExist=`docker --help | grep compose`
if [ $? -eq 0 ]; then
true # Placeholder, do nothing
else
echo "ERROR: No docker service environment found, please install compose plugin first."
exit
fi
components=""
case "${1}" in
*)
components=$@
esac
cd ${playground_dir}
docker compose up ${components}
# Clean Docker containers when you quit this script
docker compose down
In which if everyone approves, I will then:
launch-playground.sh
fix: use compose v2 syntax
Please let me know if I missed anything.
Hi @kahnwong, it looks good! Could you commit it to the PR branch?
cc @unknowntpo @xunliu for final review
LGTM
In docker compose v2, the command
docker-compose
has been updated todocker compose
. Ref: https://docs.docker.com/compose/releases/migrate/.In this pr, in addition to existing check for availability of
docker-compose
, it also sees ifdocker compose
exists.Previously, if your system has compose v2, the launch script would fail. With this pr, systems using compose v2 will not result in an exit code.