From f2b13ae1385399483d7c03a4b7cb753a7c49e1af Mon Sep 17 00:00:00 2001 From: Felix Zumstein Date: Sun, 21 Apr 2024 15:08:16 +0000 Subject: [PATCH] devcontainer improvements --- .devcontainer/devcontainer.json | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ccfd680..7b8a1f8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,17 +6,32 @@ "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", // Features to add to the dev container. More info: https://containers.dev/features. "features": { - "ghcr.io/devcontainers/features/node:1": {}, - "ghcr.io/devcontainers/features/docker-in-docker:2": {} + "ghcr.io/devcontainers/features/node:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, }, // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [ 8000 ], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pip install -r requirements.txt && pip install pre-commit && pre-commit" + "postCreateCommand": "pip install -r requirements.txt && pip install pre-commit", + // pre-commit has issues without safe.directory + "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", // Configure tool-specific properties. // "customizations": {}, // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "samuelcolvin.jinjahtml", + "esbenp.prettier-vscode", + "ms-python.black-formatter", + "finico.quickopenselection", + ] + } + } }