Skip to content

Commit 707660e

Browse files
committed
Add initial devcontainer support
1 parent d905cf0 commit 707660e

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.devcontainer/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.pytest_cache
3+
ms-python-insiders.vsix

.devcontainer/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM mcr.microsoft.com/devcontainers/python:3.7
2+
3+
ENV CI_PYTHON_PATH=python
4+
5+
RUN apt-get update
6+
RUN apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libdrm2 libgtk-3-0 libgbm-dev libasound2

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"build": {
7+
"dockerfile": "./Dockerfile",
8+
"context": ".."
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"editorconfig.editorconfig",
14+
"esbenp.prettier-vscode",
15+
"dbaeumer.vscode-eslint",
16+
"ms-python.python",
17+
"ms-python.black-formatter",
18+
"ms-python.vscode-pylance"
19+
],
20+
"settings": {
21+
"python.defaultInterpreterPath": "/usr/local/bin/python"
22+
}
23+
}
24+
},
25+
// Features to add to the dev container. More info: https://containers.dev/features.
26+
// "features": {},
27+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
28+
// "forwardPorts": [],
29+
// Use 'postCreateCommand' to run commands after the container is created.
30+
"postCreateCommand": "bash scripts/post_create_command.sh",
31+
"features": {
32+
"ghcr.io/devcontainers/features/node:1": {
33+
"nodeGypDependencies": true,
34+
"version": "16"
35+
}
36+
},
37+
// Configure tool-specific properties.
38+
// "customizations": {},
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

scripts/post_create_command.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
export PATH="./node_modules/.bin:$PATH"
4+
5+
gulp installPythonLibs
6+
npm install
7+
npm run compile

0 commit comments

Comments
 (0)