Skip to content

Commit ae3a0f4

Browse files
committed
Add initial devcontainer support
1 parent 56d1912 commit ae3a0f4

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.devcontainer/.dockerignore

+3
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

+6
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

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
// Features to add to the dev container. More info: https://containers.dev/features.
11+
// "features": {},
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
"postCreateCommand": "bash scripts/post_create_command.sh",
16+
"features": {
17+
"ghcr.io/devcontainers/features/node:1": {
18+
"nodeGypDependencies": true,
19+
"version": "16"
20+
}
21+
},
22+
// Configure tool-specific properties.
23+
// "customizations": {},
24+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25+
// "remoteUser": "root"
26+
}

scripts/post_create_command.sh

+7
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)