perf(devcontainer): simplify initialization

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Fernando Fernández 2023-12-13 00:51:45 +00:00 committed by GitHub
parent 722e475791
commit b7f2714d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -8,6 +8,7 @@
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"forwardPorts": [3000],
@ -17,9 +18,11 @@
"onAutoForward": "notify"
}
},
"onCreateCommand": "apt update -qq && apt install -y --no-install-recommends jq",
"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"
},
"postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension",

View File

@ -1,9 +1,6 @@
#!/bin/bash
unset YARN_VERSION && rm -rf /opt/yarn*
rm -rf /bin/sh && ln -s /bin/bash /bin/sh
git config --global core.editor 'code --wait'
## 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