From a3c0df05ff37898ac1969dfa5020f1971ebdd352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Thu, 3 Oct 2024 21:17:17 +0000 Subject: [PATCH] ci(devcontainer): use official debian base image --- .devcontainer/devcontainer.json | 9 ++------- .devcontainer/postunpack.sh | 7 +++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e72ee22b04d..56df157dc8d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "jellyfin-vue Codespace (with support for Tauri and Docker development)", - "image": "node:20-slim", + "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { "ghcr.io/devcontainers/features/rust:1": { "profile": "default" @@ -8,7 +8,6 @@ "ghcr.io/devcontainers/features/docker-in-docker:2": { "installDockerComposeSwitch": false }, - "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {}, "ghcr.io/devcontainers/features/github-cli:1": {} }, "forwardPorts": [3000], @@ -19,11 +18,7 @@ } }, "postCreateCommand": { - "npm": "npm ci --no-audit", - "no-yarn": "unset YARN_VERSION && rm -rf /opt/yarn*", - "use-bash": "rm -rf /bin/sh && ln -s /bin/bash /bin/sh", - "git-config": "git config --global core.editor 'code --wait'", - "postunpack": ".devcontainer/postunpack.sh" + "postunpack": ".devcontainer/postunpack.sh && npm ci --no-audit" }, "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", "hostRequirements": { "cpus": 4, "memory": "8gb" } diff --git a/.devcontainer/postunpack.sh b/.devcontainer/postunpack.sh index 017bfd666d1..d7f61ac0dc4 100755 --- a/.devcontainer/postunpack.sh +++ b/.devcontainer/postunpack.sh @@ -1,6 +1,9 @@ #!/bin/bash -## Install Tauri dependencies +## Setup Node.js repository +curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash + +## Install dependencies apt update -apt install -y --no-install-recommends $(cat packaging/tauri/apt_packages) +apt install -y --no-install-recommends $(cat packaging/tauri/apt_packages) nodejs rm -rf /var/lib/apt/lists /var/cache/apt/archives