|
1 | 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the |
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/python |
3 | 3 | { |
4 | | - "name": "Kubernetes Ansible Python", |
| 4 | + "name": "Kubernetes Ansible Projects", |
5 | 5 | "build": { |
6 | 6 | "dockerfile": "Dockerfile", |
7 | 7 | // Args is one of arm64 or amd64 |
|
10 | 10 | } |
11 | 11 | }, |
12 | 12 | "features": { |
13 | | - "ghcr.io/devcontainers/features/docker-in-docker:2": { |
14 | | - "moby": true, |
15 | | - "azureDnsAutoDetection": true, |
16 | | - "installDockerBuildx": true, |
17 | | - "installDockerComposeSwitch": true, |
18 | | - "version": "latest", |
19 | | - "dockerDashComposeVersion": "v2" |
20 | | - }, |
21 | 13 | "ghcr.io/devcontainers/features/git:1": { |
22 | 14 | "ppa": true, |
23 | 15 | "version": "os-provided" |
24 | 16 | } |
25 | 17 | }, |
26 | | - // We mount bash history in an attempt to preserver history |
27 | | - // between container restarts |
| 18 | + // The user will need a ~/k8s-config directory where, as a matter of style |
| 19 | + // we tend to keep our kubernetes configuration files. The user will also |
| 20 | + // need a ~/.kube directory. |
| 21 | + // |
| 22 | + // We mount bash history in an attempt to preserver history between container restarts |
28 | 23 | // (see https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history) |
29 | 24 | // |
30 | | - // The user will also need a ~/k8s-config directory (kubernetes config files) |
31 | | - // as well as a ~/.kube directory |
32 | 25 | "mounts": [ |
33 | 26 | "source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached", |
34 | 27 | "source=${localEnv:HOME}/k8s-config,target=/home/vscode/k8s-config,type=bind,consistency=cached", |
35 | 28 | "source=${localEnv:HOME}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached", |
36 | 29 | "source=projectname-bashhistory,target=/commandhistory,type=volume" |
37 | 30 | ], |
| 31 | + // Studio Code custom module/plugins to load. |
38 | 32 | "customizations": { |
39 | 33 | "vscode": { |
40 | 34 | "extensions": [ |
|
44 | 38 | "eamodio.gitlens", |
45 | 39 | "github.vscode-github-actions", |
46 | 40 | "ms-kubernetes-tools.vscode-kubernetes-tools", |
47 | | - "ms-python.vscode-pylance", |
48 | 41 | "sourcery.sourcery", |
49 | 42 | "streetsidesoftware.code-spell-checker", |
50 | 43 | "trond-snekvik.simple-rst", |
|
53 | 46 | ] |
54 | 47 | } |
55 | 48 | }, |
| 49 | + // Things to do once the container's available... |
56 | 50 | "postCreateCommand": { |
57 | 51 | "Fix Volume Permissions": "sudo chown -R $(whoami): /commandhistory" |
58 | 52 | }, |
| 53 | + // Do we expect to expose ports the user needs to connect to? |
| 54 | + // If so list them (as integers) here. |
59 | 55 | "forwardPorts": [] |
60 | 56 | } |
0 commit comments