From ca4b8c973c9e0961bd7380aae23e0239ca285998 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= <oddstr13@openshell.no>
Date: Sun, 2 Jul 2023 01:55:17 +0000
Subject: [PATCH] Add Python 2.7 devcontainer

---
 .devcontainer/Python 2.7/devcontainer.json | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 .devcontainer/Python 2.7/devcontainer.json

diff --git a/.devcontainer/Python 2.7/devcontainer.json b/.devcontainer/Python 2.7/devcontainer.json
new file mode 100644
index 00000000..ce0f9a92
--- /dev/null
+++ b/.devcontainer/Python 2.7/devcontainer.json	
@@ -0,0 +1,38 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the
+// README at: https://github.com/devcontainers/templates/tree/main/src/debian
+{
+	"name": "Python 2.7",
+	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
+	"image": "mcr.microsoft.com/devcontainers/base:bullseye",
+
+	// Features to add to the dev container. More info: https://containers.dev/features.
+	// "features": {},
+	"features": {
+		"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
+			"packages": "python2"
+		}
+	},
+
+	// Use 'forwardPorts' to make a list of ports inside the container available locally.
+	// "forwardPorts": [],
+
+	// Use 'postCreateCommand' to run commands after the container is created.
+	"postCreateCommand": "sudo ln -s /usr/bin/python2.7 /usr/bin/python; curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output /tmp/get-pip.py && sudo python /tmp/get-pip.py && pip install --user -r requirements-dev.txt",
+
+	// Configure tool-specific properties.
+	"customizations": {
+		"vscode": {
+			"extensions": [
+				"mikestead.dotenv",
+				"EditorConfig.EditorConfig",
+				"GitHub.vscode-pull-request-github",
+				"hbenl.vscode-test-explorer",
+				"redhat.vscode-xml",
+				"ninoseki.vscode-pylens"
+			]
+		}
+	}
+
+	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
+	// "remoteUser": "root"
+}