Skip to content

Commit 7b75ea4

Browse files
Add devcontainer (nhs-england-tools#190)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description - Added a .devcontainer file that automatically installs tools and runs make config. - Maps the local gpg folder and TTY for pgp passkey ## Context So people can use the repository without installing tools locally ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [ ] Refactoring (non-breaking change) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md) (Doesn't exist?) - [ ] I have followed the code style of the project - [ ] I have added tests to cover my changes - [ ] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent 0414d08 commit 7b75ea4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Ubuntu",
3+
"image": "mcr.microsoft.com/devcontainers/base:noble",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6+
"moby": true,
7+
"azureDnsAutoDetection": true,
8+
"installDockerBuildx": true,
9+
"installDockerComposeSwitch": true,
10+
"version": "latest",
11+
"dockerDashComposeVersion": "v2"
12+
},
13+
"ghcr.io/devcontainers/features/go:1": {},
14+
"ghcr.io/azutake/devcontainer-features/go-packages-install:0": {
15+
"PACKAGES": "github.com/asdf-vm/asdf/cmd/[email protected]"
16+
},
17+
"ghcr.io/devcontainers/features/python:1": {},
18+
"ghcr.io/devcontainers/features/common-utils": {
19+
"installZsh": true,
20+
"installOhMyZsh": true,
21+
"installOhMyZshConfig": true,
22+
"configureZshAsDefaultShell": true
23+
},
24+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
25+
"plugins": "zsh-autosuggestions zsh-syntax-highlighting",
26+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions.git https://github.com/zsh-users/zsh-syntax-highlighting.git"
27+
}
28+
},
29+
"postCreateCommand": "pipx install pre-commit && make config && echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc",
30+
"mounts": [
31+
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached"
32+
]
33+
}

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
terraform 1.7.0
44
pre-commit 3.6.0
55
vale 3.6.0
6+
gitleaks 8.18.4
67

78
# ==============================================================================
89
# The section below is reserved for Docker image versions.

0 commit comments

Comments
 (0)