Skip to content

Commit e701af2

Browse files
Copilotstnguyen90
andcommitted
Apply changes from PR #55: use docker-cli-compose package
- Remove manual docker-compose installation - Replace with docker-cli-compose Alpine package - Remove DOCKER_CONFIG and DOCKER_COMPOSE_VERSION env vars - Add RUN set -ex for better error visibility - Add docker compose version test Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
1 parent bd3fca5 commit e701af2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,10 @@ FROM $BASEIMAGE AS final
166166

167167
LABEL maintainer="team@appwrite.io"
168168

169-
ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
170-
ENV DOCKER_COMPOSE_VERSION="v2.33.1"
171-
172169
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
173170

171+
RUN set -ex
172+
174173
RUN \
175174
apk update \
176175
&& apk upgrade \
@@ -202,6 +201,7 @@ RUN \
202201
libmaxminddb-dev \
203202
certbot \
204203
docker-cli \
204+
docker-cli-compose \
205205
libgomp \
206206
git \
207207
zip \
@@ -210,11 +210,6 @@ RUN \
210210
&& apk del .deps \
211211
&& rm -rf /var/cache/apk/*
212212

213-
RUN mkdir -p $DOCKER_CONFIG/cli-plugins \
214-
&& ARCH=$(uname -m) && if [ $ARCH == "armv7l" ]; then ARCH="armv7"; fi \
215-
&& curl -SL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-linux-$ARCH -o $DOCKER_CONFIG/cli-plugins/docker-compose \
216-
&& chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
217-
218213
WORKDIR /usr/src/code
219214

220215
COPY --from=swoole /usr/local/lib/php/extensions/no-debug-non-zts-20240924/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/

tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ commandTests:
1717
command: "docker"
1818
args: ["--version"]
1919
expectedOutput: ["Docker version 28.*"]
20+
- name: 'Docker Compose command'
21+
command: "docker"
22+
args: ["compose", "version"]
23+
expectedOutput: ["Docker Compose version v.*"]
2024
- name: 'PHP modules'
2125
command: "php"
2226
args: ["-m"]

0 commit comments

Comments
 (0)