mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-11-23 05:59:55 +00:00
ci(devcontainer): use official debian base image
Some checks are pending
Push & Release 🌍 / Automation 🎛️ (push) Waiting to run
Push & Release 🌍 / ${{ github.event_name == 'push' && 'Unstable 🚀⚠️' || 'Stable 🏷️✅' }} (push) Waiting to run
Push & Release 🌍 / GitHub CodeQL 🔬 (push) Waiting to run
Push & Release 🌍 / Deploy 🚀 (push) Blocked by required conditions
Some checks are pending
Push & Release 🌍 / Automation 🎛️ (push) Waiting to run
Push & Release 🌍 / ${{ github.event_name == 'push' && 'Unstable 🚀⚠️' || 'Stable 🏷️✅' }} (push) Waiting to run
Push & Release 🌍 / GitHub CodeQL 🔬 (push) Waiting to run
Push & Release 🌍 / Deploy 🚀 (push) Blocked by required conditions
This commit is contained in:
parent
e0a7569db7
commit
3fbf550a15
37
.devcontainer/Dockerfile
Normal file
37
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,37 @@
|
||||
FROM mcr.microsoft.com/devcontainers/base:debian
|
||||
|
||||
USER root
|
||||
RUN rm -rf /bin/sh && ln -s /bin/bash /bin/sh
|
||||
|
||||
# Create a helper for installing packages leaving no traces behind
|
||||
COPY <<EOF /usr/sbin/install_packages
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
n=0
|
||||
max=2
|
||||
until [ \$n -gt \$max ]; do
|
||||
set +e
|
||||
(
|
||||
apt update -qq &&
|
||||
apt install -y --no-install-recommends "\$@"
|
||||
)
|
||||
CODE=\$?
|
||||
set -e
|
||||
if [ \$CODE -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
if [ \$n -eq \$max ]; then
|
||||
exit \$CODE
|
||||
fi
|
||||
echo "apt failed, retrying"
|
||||
n=\$((\$n + 1))
|
||||
done
|
||||
rm -rf /var/lib/apt/lists/{*,.*} /var/cache/apt/archives/{*,.*}
|
||||
EOF
|
||||
|
||||
# Set permissions and install node
|
||||
RUN chmod 0755 /usr/sbin/install_packages && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash && \
|
||||
install_packages nodejs
|
@ -1,6 +1,9 @@
|
||||
{
|
||||
"name": "jellyfin-vue Codespace (with support for Tauri and Docker development)",
|
||||
"image": "node:20-slim",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"remoteUser": "root",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/rust:1": {
|
||||
"profile": "default"
|
||||
@ -8,7 +11,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,12 +21,12 @@
|
||||
}
|
||||
},
|
||||
"postCreateCommand": {
|
||||
"tauri-deps": "install_packages $(cat packaging/tauri/apt_packages)",
|
||||
"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"
|
||||
"unshallow": "git fetch --unshallow || true"
|
||||
},
|
||||
"postAttachCommand": {
|
||||
"install-extensions": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension"
|
||||
},
|
||||
"postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension",
|
||||
"hostRequirements": { "cpus": 4, "memory": "8gb" }
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Install Tauri dependencies
|
||||
apt update
|
||||
apt install -y --no-install-recommends $(cat packaging/tauri/apt_packages)
|
||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
Loading…
Reference in New Issue
Block a user