Skip to content

Commit 132a747

Browse files
committed
chore: add devcontainer
Signed-off-by: Sebastian Davids <[email protected]>
1 parent 22af55d commit 132a747

File tree

5 files changed

+95
-0
lines changed

5 files changed

+95
-0
lines changed

.devcontainer/devcontainer-lock.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers-extra/features/apt-get-packages:1.0.7": {
4+
"version": "1.0.7",
5+
"resolved": "ghcr.io/devcontainers-extra/features/apt-get-packages@sha256:95b186432c782c4a71433c0961d5d1cec6cd5cb2a22542287e09714799bab6b2",
6+
"integrity": "sha256:95b186432c782c4a71433c0961d5d1cec6cd5cb2a22542287e09714799bab6b2"
7+
},
8+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1.6.0": {
9+
"version": "1.6.0",
10+
"resolved": "ghcr.io/devcontainers/features/docker-outside-of-docker@sha256:63dc56535ecaed989f2e6c8ca04acb5012999cd0e19f125504350b2e075b0c2c",
11+
"integrity": "sha256:63dc56535ecaed989f2e6c8ca04acb5012999cd0e19f125504350b2e075b0c2c"
12+
},
13+
"ghcr.io/dhoeric/features/hadolint:1.0.0": {
14+
"version": "1.0.0",
15+
"resolved": "ghcr.io/dhoeric/features/hadolint@sha256:993e7e6f14b7f53aafefb081eb8396ea08f3d48aebb23c91fbaa10651ca0a835",
16+
"integrity": "sha256:993e7e6f14b7f53aafefb081eb8396ea08f3d48aebb23c91fbaa10651ca0a835"
17+
}
18+
}
19+
}

.devcontainer/devcontainer.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// SPDX-FileCopyrightText: © 2025 Sebastian Davids <[email protected]>
2+
// SPDX-License-Identifier: Apache-2.0
3+
{
4+
"name": "sdavids.de-homepage",
5+
// https://mcr.microsoft.com/v2/devcontainers/javascript-node/tags/list
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1.1.8-22-bookworm",
7+
"postCreateCommand": "./.devcontainer/post_create.sh",
8+
"features": {
9+
// https://github.com/devcontainers/features/pkgs/container/features%2Fdocker-outside-of-docker
10+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1.6.0": {},
11+
// https://github.com/devcontainers-extra/features/tree/main/src/apt-get-packages
12+
"ghcr.io/devcontainers-extra/features/apt-get-packages:1.0.7": {
13+
"packages": "brotli,easy-rsa,reuse,shellcheck,shfmt,yamllint,zstd"
14+
},
15+
// https://github.com/dhoeric/features/blob/main/src/hadolint/README.md
16+
"ghcr.io/dhoeric/features/hadolint:1.0.0": {
17+
// https://github.com/hadolint/hadolint/releases
18+
"version": "2.12.0"
19+
}
20+
},
21+
"remoteEnv": {
22+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
23+
},
24+
"customizations": {
25+
"jetbrains": {
26+
"backend": "WebStorm",
27+
"plugins": [
28+
"ski.chrzanow.foldableprojectview",
29+
"org.asciidoctor.intellij.asciidoc",
30+
"intellij.prettierJS",
31+
"mobi.hsz.idea.gitignore",
32+
"com.github.aleksandrsl.intellijbrowserslist"
33+
],
34+
"settings": {
35+
"com.intellij:app:EditorSettings.is_ensure_newline_at_eof": true,
36+
"com.intellij:app:EditorSettings.remove_trailing_blank_lines": true
37+
}
38+
},
39+
"vscode": {
40+
"extensions": [
41+
"EditorConfig.EditorConfig",
42+
"ms-azuretools.vscode-docker",
43+
"github.vscode-github-actions",
44+
"asciidoctor.asciidoctor-vscode",
45+
"dbaeumer.vscode-eslint",
46+
"esbenp.prettier-vscode",
47+
"redhat.vscode-yaml",
48+
"tamasfe.even-better-toml",
49+
"timonwong.shellcheck",
50+
"foxundermoon.shell-format",
51+
"webben.browserslist"
52+
],
53+
"settings": {
54+
"files.encoding": "utf8",
55+
"files.eol": "\n",
56+
"files.insertFinalNewline": true,
57+
"files.trimFinalNewlines": true,
58+
"files.trimTrailingWhitespace": true,
59+
"shellformat.flag": "--indent 2 --case-indent --binary-next-line --simplify"
60+
}
61+
}
62+
}
63+
}

.devcontainer/post_create.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
# SPDX-FileCopyrightText: © 2025 Sebastian Davids <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# https://github.com/microsoft/vscode-dev-containers/issues/559
7+
bash -i -c 'cd hp && nvm install -b --no-progress && npm install --no-ignore-scripts --silent --fund=false && npx playwright install --with-deps --no-shell'

REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ SPDX-License-Identifier = "Apache-2.0"
6666
path = "hp/jsconfig.json"
6767
SPDX-FileCopyrightText = "© 2025 Sebastian Davids <[email protected]>"
6868
SPDX-License-Identifier = "Apache-2.0"
69+
70+
[[annotations]]
71+
path = [".devcontainer/devcontainer-lock.json"]
72+
SPDX-FileCopyrightText = "© 2025 Sebastian Davids <[email protected]>"
73+
SPDX-License-Identifier = "Apache-2.0"

hp/.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# https://prettier.io/docs/en/ignore.html
55

66
package-lock.json
7+
devcontainer-lock.json
78
dist/
89
.idea/
910
.fleet/

0 commit comments

Comments
 (0)