Skip to content

Commit

Permalink
♻️ Refactor dev container (#4397)
Browse files Browse the repository at this point in the history
* Replace the monolithic devcontainer

Signed-off-by: Jacob Woffenden <[email protected]>

* Update EditorConfig

Signed-off-by: Jacob Woffenden <[email protected]>

* Update docs

Signed-off-by: Jacob Woffenden <[email protected]>

---------

Signed-off-by: Jacob Woffenden <[email protected]>
  • Loading branch information
Jacob Woffenden authored May 23, 2024
1 parent 5d896c9 commit 84b812e
Show file tree
Hide file tree
Showing 82 changed files with 339 additions and 2,266 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "1.0.11",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:464564228ccdd6028f01f8a62a3cfbaf76e9ba7953b29ac0e53ba2c262604312",
"integrity": "sha256:464564228ccdd6028f01f8a62a3cfbaf76e9ba7953b29ac0e53ba2c262604312"
},
"ghcr.io/ministryofjustice/devcontainer-feature/aws:1": {
"version": "1.0.0",
"resolved": "ghcr.io/ministryofjustice/devcontainer-feature/aws@sha256:bb07a76c8e7a6b630a2056ce959addddee436e3f9936c69b9163eff54f58dbd5",
"integrity": "sha256:bb07a76c8e7a6b630a2056ce959addddee436e3f9936c69b9163eff54f58dbd5"
},
"ghcr.io/ministryofjustice/devcontainer-feature/kubernetes:1": {
"version": "1.0.1",
"resolved": "ghcr.io/ministryofjustice/devcontainer-feature/kubernetes@sha256:0ec758e44468ba2a8b70b87613762ab04e50f7bb5eac8f2aea592cff213dbde5",
"integrity": "sha256:0ec758e44468ba2a8b70b87613762ab04e50f7bb5eac8f2aea592cff213dbde5"
},
"ghcr.io/ministryofjustice/devcontainer-feature/static-analysis:1": {
"version": "1.0.0",
"resolved": "ghcr.io/ministryofjustice/devcontainer-feature/static-analysis@sha256:e81d52725655c8ffb861605feac7ad155b447d51af65f6c3a03cab32d59f1e16",
"integrity": "sha256:e81d52725655c8ffb861605feac7ad155b447d51af65f6c3a03cab32d59f1e16"
},
"ghcr.io/ministryofjustice/devcontainer-feature/terraform:1": {
"version": "1.0.0",
"resolved": "ghcr.io/ministryofjustice/devcontainer-feature/terraform@sha256:af3b3891cf31ff373df29998c690257d6f21f2ee4536bc4d692856408ef0c83a",
"integrity": "sha256:af3b3891cf31ff373df29998c690257d6f21f2ee4536bc4d692856408ef0c83a"
}
}
}
49 changes: 13 additions & 36 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
{
"name": "data-platform",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"name": "analytical-platform",
"image": "ghcr.io/ministryofjustice/devcontainer-base:latest",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": { "configureZshAsDefaultShell": true },
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/node:1": {},
"./features/src/base": {},
"./features/src/aws-tools": {},
"./features/src/cicd-tools": {},
"./features/src/container-tools": {},
"./features/src/git-tools": {},
"./features/src/kubernetes-tools": {},
"./features/src/policy-tools": {},
"./features/src/pulumi-tools": {},
"./features/src/sast-tools": {},
"./features/src/terraform-tools": {}
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/ministryofjustice/devcontainer-feature/aws:1": {},
"ghcr.io/ministryofjustice/devcontainer-feature/kubernetes:1": {},
"ghcr.io/ministryofjustice/devcontainer-feature/static-analysis:1": {},
"ghcr.io/ministryofjustice/devcontainer-feature/terraform:1": {}
},
"containerEnv": {
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}",
"GITHUB_USER": "${localEnv:GITHUB_USER}"
},
"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers/features/common-utils",
"./features/src/base"
],
"remoteUser": "vscode",
"runArgs": ["--name=data-platform-devcontainer"],
"mounts": [
{ "source": "ministryofjustice-data-platform-devcontainer-persisted", "target": "/opt/vscode-dev-containers", "type": "volume" },
{ "source": "ministryofjustice-data-platform-devcontainer-workspace", "target": "/home/vscode/workspace", "type": "volume" },
{ "source": "ministryofjustice-data-platform-devcontainer-commandhistory", "target": "/home/vscode/.commandhistory", "type": "volume" }
],
"workspaceFolder": "/home/vscode/workspace",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {
"dotfiles.repository": "https://github.com/${localEnv:GITHUB_USER}/dotfiles",
"dotfiles.targetPath": "~/dotfiles",
"dotfiles.installCommand": "setup.sh"
}
"extensions": [
"EditorConfig.EditorConfig",
"GitHub.vscode-github-actions",
"GitHub.vscode-pull-request-github"
]
}
}
}
43 changes: 0 additions & 43 deletions .devcontainer/features/src/aws-tools/devcontainer-feature.json

This file was deleted.

36 changes: 0 additions & 36 deletions .devcontainer/features/src/aws-tools/install-aws-cli.sh

This file was deleted.

27 changes: 0 additions & 27 deletions .devcontainer/features/src/aws-tools/install-aws-nuke.sh

This file was deleted.

36 changes: 0 additions & 36 deletions .devcontainer/features/src/aws-tools/install-aws-vault.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .devcontainer/features/src/aws-tools/install.sh

This file was deleted.

102 changes: 0 additions & 102 deletions .devcontainer/features/src/aws-tools/src/home/vscode/.aws/config

This file was deleted.

40 changes: 0 additions & 40 deletions .devcontainer/features/src/base/.zshrc

This file was deleted.

Loading

0 comments on commit 84b812e

Please sign in to comment.