File tree 3 files changed +45
-13
lines changed
3 files changed +45
-13
lines changed Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/devcontainers/base:debian
2
+
3
+ USER root
4
+ RUN rm -rf /bin/sh && ln -s /bin/bash /bin/sh
5
+
6
+ # Create a helper for installing packages leaving no traces behind
7
+ COPY <<EOF /usr/sbin/install_packages
8
+ # !/bin/bash
9
+ set -e
10
+ set -u
11
+ export DEBIAN_FRONTEND=noninteractive
12
+ n=0
13
+ max=2
14
+ until [ \$ n -gt \$ max ]; do
15
+ set +e
16
+ (
17
+ apt update -qq &&
18
+ apt install -y --no-install-recommends "\$ @"
19
+ )
20
+ CODE=\$ ?
21
+ set -e
22
+ if [ \$ CODE -eq 0 ]; then
23
+ break
24
+ fi
25
+ if [ \$ n -eq \$ max ]; then
26
+ exit \$ CODE
27
+ fi
28
+ echo "apt failed, retrying"
29
+ n=\$ ((\$ n + 1))
30
+ done
31
+ rm -rf /var/lib/apt/lists/{*,.*} /var/cache/apt/archives/{*,.*}
32
+ EOF
33
+
34
+ # Set permissions and install node
35
+ RUN chmod 0755 /usr/sbin/install_packages && \
36
+ curl -fsSL https://deb.nodesource.com/setup_lts.x | bash && \
37
+ install_packages nodejs
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jellyfin-vue Codespace (with support for Tauri and Docker development)" ,
3
- "image" : " node:20-slim" ,
3
+ "build" : {
4
+ "dockerfile" : " Dockerfile"
5
+ },
4
6
"features" : {
5
7
"ghcr.io/devcontainers/features/rust:1" : {
6
8
"profile" : " default"
7
9
},
8
10
"ghcr.io/devcontainers/features/docker-in-docker:2" : {
9
11
"installDockerComposeSwitch" : false
10
12
},
11
- "ghcr.io/eitsupi/devcontainer-features/jq-likes:2" : {},
12
13
"ghcr.io/devcontainers/features/github-cli:1" : {}
13
14
},
14
15
"forwardPorts" : [3000 ],
20
21
},
21
22
"postCreateCommand" : {
22
23
"npm" : " npm ci --no-audit" ,
23
- "no-yarn" : " unset YARN_VERSION && rm -rf /opt/yarn*" ,
24
- "use-bash" : " rm -rf /bin/sh && ln -s /bin/bash /bin/sh" ,
25
- "git-config" : " git config --global core.editor 'code --wait'" ,
26
- "postunpack" : " .devcontainer/postunpack.sh"
24
+ "postunpack" : " install_packages $(cat packaging/tauri/apt_packages)" ,
25
+ "unshallow" : " git fetch --unshallow"
26
+ },
27
+ "postAttachCommand" : {
28
+ "install-extensions" : " cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension"
27
29
},
28
- "postAttachCommand" : " cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension" ,
29
30
"hostRequirements" : { "cpus" : 4 , "memory" : " 8gb" }
30
31
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments