features
features copied to clipboard
Python Feature: Fails if the dev container has the requested python version already installed
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.10.8"
}
}
}
fails in Codespace with:
#9 [internal] load metadata for mcr.microsoft.com/devcontainers/universal:2
2023-07-18 21:11:31.965Z: ------
> [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=python_0,target=/tmp/build-features-src/python_0 cp -ar /tmp/build-features-src/python_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/python_0 && cd /tmp/dev-container-features/python_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/python_0:
2023-07-18 21:11:31.967Z: 0.420 VERSION="3.10.8"
0.420 INSTALLTOOLS="********"
0.420 OPTIMIZE="false"
0.420 INSTALLPATH="/usr/local/python"
0.420 INSTALLJUPYTERLAB="false"
0.420 CONFIGUREJUPYTERLABALLOWORIGIN=""
0.420 HTTPPROXY=""
0.420 ===========================================================================
0.897 (!) Python version 3.10.8 already exists.
0.898 ERROR: Feature "Python" (ghcr.io/devcontainers/features/python) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/python for help troubleshooting this error.
------
2023-07-18 21:11:31.968Z: ERROR: failed to solve: executor failed running [/bin/sh -c cp -ar /tmp/build-features-src/python_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/python_0 && cd /tmp/dev-container-features/python_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/python_0]: exit code: 1
2023-07-18 21:11:31.973Z: Stop: Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.48.0-1689714437327 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-piexif-84245a1f0cf0b6ad7f4886c497e6f2db33d3660ea0f660d1508cb7a8feaff009-features -f /tmp/devcontainercli-root/container-features/0.48.0-1689714437327/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-07-18 21:11:31.978Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.48.0-1689714437327 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-piexif-84245a1f0cf0b6ad7f4886c497e6f2db33d3660ea0f660d1508cb7a8feaff009-features -f /tmp/devcontainercli-root/container-features/0.48.0-1689714437327/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-07-18 21:11:31.987Z: {"outcome":"error","message":"Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.48.0-1689714437327 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-piexif-84245a1f0cf0b6ad7f4886c497e6f2db33d3660ea0f660d1508cb7a8feaff009-features -f /tmp/devcontainercli-root/container-features/0.48.0-1689714437327/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder","description":"An error occurred setting up the container."}
2023-07-18 21:11:31.994Z: at Bte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2007:1066)
2023-07-18 21:11:32.001Z: at e3 (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2007:1002)
2023-07-18 21:11:32.004Z: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-07-18 21:11:32.005Z: at async Qte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2024:3660)
2023-07-18 21:11:32.007Z: at async Kf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2024:4775)
2023-07-18 21:11:32.010Z: at async xne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2156:12125)
2023-07-18 21:11:32.011Z: at async wne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2156:11866)
2023-07-18 21:11:32.013Z: devcontainer process exited with exit code 1
====================================== ERROR ====================================
2023-07-18 21:11:32.016Z: Failed to create container.
=================================================================================
2023-07-18 21:11:32.019Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.48.0-1689714437327 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-piexif-84245a1f0cf0b6ad7f4886c497e6f2db33d3660ea0f660d1508cb7a8feaff009-features -f /tmp/devcontainercli-root/container-features/0.48.0-1689714437327/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-07-18 21:11:32.021Z: Error code: 1302 (UnifiedContainersErrorFatalCreatingContainer)