Skip to content
Snippets Groups Projects
devcontainer.json 3.34 KiB
Newer Older
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
{
	"name": "TJTS5901 Dev Environment",
	// Use docker-compose to setup the container
	// https://code.visualstudio.com/docs/containers/docker-compose
Teemu Autto's avatar
Teemu Autto committed
	"dockerComposeFile": [
		"../docker-compose.yml"
	],

Teemu Autto's avatar
Teemu Autto committed
	"service": "tjts5901",

	// Don't start flask app by default.
	"overrideCommand": true,

	// Use /app -folder as a workspace folder. Otherwise it will depend on repository name.
	"workspaceFolder": "/app",

	"remoteEnv": {
		// If you do not want to sync your host .kube folder with the devcontainer, set this to false.
		// https://github.com/Microsoft/vscode-dev-containers/tree/main/containers/kubernetes-helm
		"SYNC_LOCALHOST_KUBECONFIG": "true",
		// Setup flask debug mode to be on in devcontainer
		"FLASK_DEBUG": "1",
		// Pass in the host directory for Docker mount commands from inside the container
		//"HOST_PROJECT_PATH": "${localWorkspaceFolder}"
	},
	// Configure tool-specific properties.
	"customizations": {
		// Configure properties specific to VS Code.
		"vscode": {
			// Set *default* container specific settings.json values on container create.
			"settings": { 
				"python.defaultInterpreterPath": "/usr/local/bin/python",
				"python.linting.enabled": true,
				"python.linting.pylintEnabled": true,
				"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
				"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
				"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
				"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
				"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
				"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
				"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
				"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
				"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
				"python.unitTest.pyTestEnabled": true,
				"python.unitTest.pyTestArgs": [
					"--exitfirst",
					"--verbose",
					"--color=auto"
				],
				"[python]": {
					"editor.rulers": [120]
				},
				// Enable the terminal to be used as the default shell.
				"terminal.integrated.shellIntegration.enabled": true,
Teemu Autto's avatar
Teemu Autto committed
				"gitlab.showPipelineUpdateNotifications": true
			},

			// Add the IDs of extensions you want installed when the container is created.
			"extensions": [
Teemu Autto's avatar
Teemu Autto committed
				"ms-python.python",
				"ms-azuretools.vscode-docker",
Teemu Autto's avatar
Teemu Autto committed
				"redhat.vscode-yaml",
				"GitLab.gitlab-workflow",
				"samuelcolvin.jinjahtml"
			]
		}
	},

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
Teemu Autto's avatar
Teemu Autto committed

	// Uncomment the next line if you want start specific services in your Docker Compose config.
	// "runServices": [],
	// Use 'postCreateCommand' to run commands after the container is created.
	// Here we install kube sync support
Teemu Autto's avatar
Teemu Autto committed
	"postCreateCommand": "/bin/sh .devcontainer/post-create.sh",

	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode",

	"features": {
		"docker-from-docker": "latest",
		"kubectl-helm-minikube": {
			"version": "1.24",
			"minikube": "none",
		},
		// "terraform": "latest",
Teemu Autto's avatar
Teemu Autto committed
		"azure-cli": {
			"version": "lts"