aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/docker-in-docker/devcontainer-feature.json2
-rwxr-xr-xsrc/docker-in-docker/install.sh16
2 files changed, 16 insertions, 2 deletions
diff --git a/src/docker-in-docker/devcontainer-feature.json b/src/docker-in-docker/devcontainer-feature.json
index 1555cd6..3349821 100644
--- a/src/docker-in-docker/devcontainer-feature.json
+++ b/src/docker-in-docker/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "docker-in-docker",
- "version": "2.2.0",
+ "version": "2.2.1",
"name": "Docker (Docker-in-Docker)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh
index 9ad807e..6c889f5 100755
--- a/src/docker-in-docker/install.sh
+++ b/src/docker-in-docker/install.sh
@@ -265,7 +265,21 @@ if [ "${DOCKER_DASH_COMPOSE_VERSION}" != "none" ]; then
pip3 install --disable-pip-version-check --no-cache-dir --user pipx
pipx_bin=/tmp/pip-tmp/bin/pipx
fi
- ${pipx_bin} install --pip-args '--no-cache-dir --force-reinstall' docker-compose
+
+ set +e
+ ${pipx_bin} install --pip-args '--no-cache-dir --force-reinstall' docker-compose
+ exit_code=$?
+ set -e
+
+ if [ ${exit_code} -ne 0 ]; then
+ # Temporary: https://github.com/devcontainers/features/issues/616
+ # See https://github.com/yaml/pyyaml/issues/601
+ echo "(*) Failed to install docker-compose via pipx. Trying via pip3..."
+
+ export PYTHONUSERBASE=/usr/local
+ pip3 install --disable-pip-version-check --no-cache-dir --user "Cython<3.0" pyyaml wheel docker-compose --no-build-isolation
+ fi
+
rm -rf /tmp/pip-tmp
else
compose_v1_version="1"