Skip to content

Commit a4b1364

Browse files
committed
feat(devcontainer): add Node.js and npm to Dockerfile and post-install script
Signed-off-by: Magnus Ullberg <magnus@ullberg.us>
1 parent 3315576 commit a4b1364

5 files changed

Lines changed: 12 additions & 2 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
77
ENV PATH="$PATH:~/.local/bin"
88

99
# Install golangci-lint
10-
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git xz-utils pre-commit gitleaks codespell shellcheck && rm -rf /var/lib/apt/lists/* \
10+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git xz-utils pre-commit gitleaks codespell shellcheck nodejs npm && rm -rf /var/lib/apt/lists/* \
1111
&& GOLANGCI_LINT_VERSION=2.6.2 \
1212
&& curl -sSLO "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" \
1313
&& tar -xzf "golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" -C /tmp \

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"build": {
44
"dockerfile": "Dockerfile"
55
},
6+
"features": {
7+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
8+
"moby": false
9+
}
10+
},
611
"postAttachCommand": [
712
"/bin/bash",
813
".devcontainer/post-install.sh"

.devcontainer/post-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if ! command -v golangci-lint >/dev/null 2>&1; then
99
echo "golangci-lint not found, installing v2 via github release tarball"
1010
# We separate update and install to avoid shellcheck SC2015 warnings
1111
apt-get update || true
12-
apt-get install -y --no-install-recommends ca-certificates curl xz-utils pre-commit gitleaks codespell shellcheck || true
12+
apt-get install -y --no-install-recommends ca-certificates curl xz-utils pre-commit gitleaks codespell shellcheck nodejs npm || true
1313
GOLANGCI_LINT_VERSION=2.6.2
1414
curl -sSLO "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" || true
1515
tar -xzf golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz -C /tmp || true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ object-lease-operator/Dockerfile.catalog
3636

3737
#Ignore vscode AI rules
3838
.github/instructions/codacy.instructions.md
39+
40+
41+
#Ignore vscode AI rules
42+
.github\instructions\codacy.instructions.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

0 commit comments

Comments
 (0)