Skip to content

Commit 0da1a59

Browse files
author
Alan Christie
committed
build: Add devcontainer
1 parent 30ba59b commit 0da1a59

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bullseye",
6+
"features": {
7+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
8+
"moby": true,
9+
"azureDnsAutoDetection": true,
10+
"installDockerBuildx": true,
11+
"installDockerComposeSwitch": true,
12+
"version": "latest",
13+
"dockerDashComposeVersion": "v2"
14+
},
15+
"ghcr.io/devcontainers/features/git:1": {
16+
"ppa": true,
17+
"version": "os-provided"
18+
}
19+
},
20+
// We mount bash history in an attempt to preserver history
21+
// between container restarts
22+
// (see https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history)
23+
"mounts": [
24+
"source=projectname-bashhistory,target=/commandhistory,type=volume"
25+
],
26+
"customizations": {
27+
"vscode": {
28+
"extensions": [
29+
"codezombiech.gitignore",
30+
"donjayamanne.githistory",
31+
"donjayamanne.git-extension-pack",
32+
"eamodio.gitlens",
33+
"github.vscode-github-actions",
34+
"ms-kubernetes-tools.vscode-kubernetes-tools",
35+
"ms-python.vscode-pylance",
36+
"sourcery.sourcery",
37+
"streetsidesoftware.code-spell-checker",
38+
"trond-snekvik.simple-rst",
39+
"vivaxy.vscode-conventional-commits",
40+
"yzhang.markdown-all-in-one"
41+
]
42+
}
43+
},
44+
"postCreateCommand": {
45+
"Install Python requirements": "pip3 install --user -r requirements.txt",
46+
"Fix Volume Permissions": "sudo chown -R $(whoami): /commandhistory"
47+
},
48+
"forwardPorts": []
49+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist/
33
**/__pycache__/
44
**/*.pickle
55
tests/project-root/project-*/
6+
**/.DS_Store
67

78
# temp files
89
*~

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
poetry == 1.8.5
2+
pre-commit == 4.2.0

0 commit comments

Comments
 (0)