devcontainer.json 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {
  2. "name": "Python 3",
  3. "build": {
  4. "dockerfile": "Dockerfile",
  5. "context": "..",
  6. "args": {
  7. // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
  8. // Append -bullseye or -buster to pin to an OS version.
  9. // Use -bullseye variants on local on arm64/Apple Silicon.
  10. "VARIANT": "3.11-bookworm"
  11. }
  12. },
  13. // Configure tool-specific properties.
  14. "customizations": {
  15. // Configure properties specific to VS Code.
  16. "vscode": {
  17. // Set *default* container specific settings.json values on container create.
  18. "settings": {
  19. "python.defaultInterpreterPath": "/usr/local/bin/python",
  20. "python.linting.enabled": true,
  21. "python.formatting.blackPath": "/usr/local/py-utils/bin/black",
  22. "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy"
  23. },
  24. // Add the IDs of extensions you want installed when the container is created.
  25. "extensions": [
  26. "ms-python.python",
  27. "ms-python.vscode-pylance"
  28. ]
  29. }
  30. },
  31. // Use 'forwardPorts' to make a list of ports inside the container available locally.
  32. "forwardPorts": [ 3000 ],
  33. // Use 'postCreateCommand' to run commands after the container is created.
  34. // "postCreateCommand": "pip3 install --user -r requirements.txt",
  35. // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
  36. "remoteUser": "vscode"
  37. }