diff --git a/CHANGES.md b/CHANGES.md index 30b5b1e7db..aa91619058 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,5 @@ +- Start using docker compose V2 (from `docker-compose` to `docker compose`) + # Version 0.14.2 ## Features diff --git a/Dockerfile b/Dockerfile index e2b991cf6a..f013b73621 100755 --- a/Dockerfile +++ b/Dockerfile @@ -131,6 +131,9 @@ ARG VERSION=dev ARG DEBUG=false ENV DEBUG=$DEBUG +ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} +ENV DOCKER_COMPOSE_VERSION=v2.5.0 + ENV _APP_SERVER=swoole \ _APP_ENV=production \ _APP_LOCALE=en \ @@ -232,12 +235,17 @@ RUN \ libmaxminddb-dev \ certbot \ docker-cli \ - docker-compose \ libgomp \ && docker-php-ext-install sockets opcache pdo_mysql \ && apk del .deps \ && rm -rf /var/cache/apk/* +RUN \ + mkdir -p $DOCKER_CONFIG/cli-plugins \ + && ARCH=$(uname -m) && if [ $ARCH == "armv7l" ]; then $ARCH="armv7"; fi \ + && curl -SL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-linux-$ARCH -o $DOCKER_CONFIG/cli-plugins/docker-compose \ + && chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose + RUN \ if [ "$DEBUG" == "true" ]; then \ apk add boost boost-dev; \ diff --git a/app/tasks/install.php b/app/tasks/install.php index 05e6ad334a..a0ce54f601 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -214,9 +214,9 @@ $cli } } - Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\""); + Console::log("Running \"docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\""); - $exit = Console::execute("${env} docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr); + $exit = Console::execute("${env} docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr); if ($exit !== 0) { $message = 'Failed to install Appwrite dockers';