diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-07-19 18:50:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 18:50:22 +0300 |
commit | 7fcec6e7c9dd587b24096597367ef42e4a37465b (patch) | |
tree | 2d85db40f6c5221f3057f6a1cb0a5231184af9a0 /src | |
parent | 0e8940abead5068668bd78632ec9b20757541c95 (diff) |
Fix: Docker-in-docker for python - Arm64 (#618)feature_docker-in-docker_2.2.1
Fix: Docker-in-docker for python:3.11 - Arm64
Diffstat (limited to 'src')
-rw-r--r-- | src/docker-in-docker/devcontainer-feature.json | 2 | ||||
-rwxr-xr-x | src/docker-in-docker/install.sh | 16 |
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" |