-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add initial devcontainer support #20960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8c7415a
b3bdc33
9c7e083
2994977
a95cace
a2f99f6
5d6fb28
315681d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.pytest_cache | ||
ms-python-insiders.vsix |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:3.7 | ||
|
||
ENV CI_PYTHON_PATH=python | ||
|
||
RUN python -m pip install --upgrade pip | ||
|
||
COPY build/test-requirements.txt ./ | ||
RUN python -m pip install -r test-requirements.txt \ | ||
&& rm test-requirements.txt | ||
|
||
COPY build/smoke-test-requirements.txt ./ | ||
RUN python -m pip install -r smoke-test-requirements.txt \ | ||
&& rm smoke-test-requirements.txt | ||
|
||
COPY build/functional-test-requirements.txt ./ | ||
RUN python -m pip install -r functional-test-requirements.txt \ | ||
&& rm functional-test-requirements.txt | ||
|
||
COPY build/functional-test-requirements.txt ./ | ||
RUN python -m pip install -r functional-test-requirements.txt \ | ||
&& rm functional-test-requirements.txt | ||
|
||
COPY build/debugger-install-requirements.txt ./ | ||
RUN python -m pip install -r debugger-install-requirements.txt \ | ||
&& rm debugger-install-requirements.txt | ||
|
||
|
||
RUN apt-get update | ||
RUN apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libdrm2 libgtk-3-0 libgbm-dev libasound2 | ||
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,41 @@ | ||||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||||||||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||||||||
{ | ||||||||
"name": "VSCode Python Dev Container", | ||||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||||||||
"build": { | ||||||||
"dockerfile": "./Dockerfile", | ||||||||
"context": ".." | ||||||||
}, | ||||||||
"customizations": { | ||||||||
"vscode": { | ||||||||
"extensions": [ | ||||||||
"editorconfig.editorconfig", | ||||||||
"esbenp.prettier-vscode", | ||||||||
"dbaeumer.vscode-eslint", | ||||||||
"ms-python.python", | ||||||||
"ms-python.black-formatter", | ||||||||
"ms-python.vscode-pylance" | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
], | ||||||||
"settings": { | ||||||||
"python.defaultInterpreterPath": "/usr/local/bin/python" | ||||||||
} | ||||||||
} | ||||||||
}, | ||||||||
// Features to add to the dev container. More info: https://containers.dev/features. | ||||||||
// "features": {}, | ||||||||
// 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": "bash scripts/post_create_command.sh", | ||||||||
"features": { | ||||||||
"ghcr.io/devcontainers/features/node:1": { | ||||||||
"nodeGypDependencies": true, | ||||||||
"version": "14.18" | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @karthiknadig Please advise the node version to use here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 16.17.1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
} | ||||||||
} | ||||||||
// Configure tool-specific properties. | ||||||||
// "customizations": {}, | ||||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||||||||
// "remoteUser": "root" | ||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,81 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": true, // set this to true to hide the "out" folder with the compiled JS files | ||
"dist": true, | ||
"**/*.pyc": true, | ||
".nyc_output": true, | ||
"obj": true, | ||
"bin": true, | ||
"**/__pycache__": true, | ||
"**/node_modules": true, | ||
".vscode-test": false, | ||
".vscode test": false, | ||
"**/.mypy_cache/**": true | ||
}, | ||
"search.exclude": { | ||
"out": true, // set this to false to include "out" folder in search results | ||
"dist": true, | ||
"**/node_modules": true, | ||
"coverage": true, | ||
"languageServer*/**": true, | ||
".vscode-test": true, | ||
".vscode test": true | ||
}, | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
} | ||
"[JSON]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescript]": { | ||
"[YAML]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"[JSON]": { | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"[YAML]": { | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true | ||
}, | ||
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version | ||
"python.linting.enabled": false, | ||
"python.formatting.provider": "black", | ||
"python.sortImports.args": ["--profile", "black"], | ||
"typescript.preferences.quoteStyle": "single", | ||
"javascript.preferences.quoteStyle": "single", | ||
"typescriptHero.imports.stringQuoteStyle": "'", | ||
"prettier.printWidth": 120, | ||
"prettier.singleQuote": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"files.autoSave": "onFocusChange", | ||
"files.exclude": { | ||
"**/*.pyc": true, | ||
"**/.mypy_cache/**": true, | ||
"**/__pycache__": true, | ||
"**/node_modules": true, | ||
".nyc_output": true, | ||
".vscode test": false, | ||
".vscode-test": false, | ||
"bin": true, | ||
"dist": true, | ||
"obj": true, | ||
"out": true // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"files.trimTrailingWhitespace": true, | ||
"javascript.preferences.quoteStyle": "single", | ||
"prettier.printWidth": 120, | ||
"prettier.singleQuote": true, | ||
"python.formatting.provider": "black", | ||
"python.languageServer": "Default", | ||
"python.linting.pylintEnabled": false, | ||
"python.linting.flake8Enabled": true, | ||
"cucumberautocomplete.skipDocStringsFormat": true, | ||
"python.linting.enabled": false, | ||
"python.linting.flake8Args": [ | ||
// Match what black does. | ||
"--max-line-length=88" | ||
], | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.pylintEnabled": false, | ||
"isort.args": ["--profile", "black"], | ||
"python.testing.pytestArgs": ["src/test/pythonFiles"], | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
".vscode test": true, | ||
".vscode-test": true, | ||
"coverage": true, | ||
"dist": true, | ||
"languageServer*/**": true, | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
"typescript.preferences.importModuleSpecifier": "relative", | ||
"debug.javascript.usePreview": false | ||
"typescript.preferences.quoteStyle": "single", | ||
"typescript.tsc.autoDetect": "off", | ||
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
export PATH="./node_modules/.bin:$PATH" | ||
|
||
gulp installPythonLibs | ||
npm ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, where're these coming from?