File tree 3 files changed +46
-13
lines changed
3 files changed +46
-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
+ },
6
+ "remoteUser" : " root" ,
4
7
"features" : {
5
8
"ghcr.io/devcontainers/features/rust:1" : {
6
9
"profile" : " default"
7
10
},
8
11
"ghcr.io/devcontainers/features/docker-in-docker:2" : {
9
12
"installDockerComposeSwitch" : false
10
13
},
11
- "ghcr.io/eitsupi/devcontainer-features/jq-likes:2" : {},
12
14
"ghcr.io/devcontainers/features/github-cli:1" : {}
13
15
},
14
16
"forwardPorts" : [3000 ],
19
21
}
20
22
},
21
23
"postCreateCommand" : {
24
+ "tauri-deps" : " install_packages $(cat packaging/tauri/apt_packages)" ,
22
25
"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 "
26
+ "unshallow " : " git fetch --unshallow || true "
27
+ } ,
28
+ "postAttachCommand " : {
29
+ "install-extensions " : " cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension "
27
30
},
28
- "postAttachCommand" : " cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension" ,
29
31
"hostRequirements" : { "cpus" : 4 , "memory" : " 8gb" }
30
32
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments