Skip to content

Commit

Permalink
chore: fix devcontainer on codespaces (#23412)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs authored and pull[bot] committed Jan 16, 2024
1 parent 8652559 commit 00eb77e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .devcontainer/devcontainer.json
@@ -1,15 +1,18 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"hostRequirements": {
"cpus": 4,
"memory": "7gb",
"storage": "32gb"
},
"name": "Renovate",
"dockerFile": "Dockerfile",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {}
},
"capAdd": ["SYS_PTRACE"],
"privileged": true,
"securityOpt": ["seccomp=unconfined"],
"hostRequirements": {
"cpus": 4,
"memory": "7gb",
"storage": "32gb"
},
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,13 +24,7 @@
]
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--privileged"
],
"postCreateCommand": "yarn install",
"postCreateCommand": [".devcontainer/post-create.sh"],
// Otherwise jest watcher fails because deps were not installed yet
"waitFor": "postCreateCommand"
}
12 changes: 12 additions & 0 deletions .devcontainer/post-create.sh
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

if [[ "${CODESPACES}" == true ]]; then
echo "Fixing permissions of /tmp for GitHub Codespaces..." >&2
sudo chmod 1777 /tmp
fi

set -x

exec yarn install

0 comments on commit 00eb77e

Please sign in to comment.