From 8ca2c0b8ea06163570fe43dc2b1bae55c5f6f854 Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 10 Aug 2023 15:41:01 +0800 Subject: [PATCH] Fix devcontainer --- .devcontainer/devcontainer.json | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6cd3ef0..cfc9f02 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,36 +3,22 @@ { "name": "Python 3", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:0-3.11", + "image": "mcr.microsoft.com/devcontainers/python:1-3.11-buster", + "features": { + "ghcr.io/devcontainers/features/python:1": {} + }, // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - "settings": {}, - "extensions": [ - "streetsidesoftware.code-spell-checker" - ] - } - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [9000], - - // Use 'portsAttributes' to set default properties for specific forwarded ports. - // More info: https://containers.dev/implementors/json_reference/#port-attributes - "portsAttributes": { - "9000": { - "label": "Hello Remote World", - "onAutoForward": "notify" - } - }, + // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pip3 install -r requirements.txt" + "postCreateCommand": "pip3 install --user -r requirements.txt" + + // Configure tool-specific properties. + // "customizations": {}, // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root"