diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..b8903f505d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +{ + "name": "GStreamer Dev Toolbox", + "image": "registry.freedesktop.org/gstreamer/gstreamer/amd64/fedora:gst-toolbox-main", + "containerUser": "containeruser", + "remoteUser": "containeruser", + "postCreateCommand": ["python3", "${containerWorkspaceFolder}/ci/scripts/handle-subprojects-cache.py" ,"--cache-dir", "/subprojects", "subprojects/"], + "privileged": false, + "capAdd": [ "SYS_PTRACE" ], + "customizations": { + "vscode": { + "settings": { + "files.watcherExclude": { + "**/target/**": true + }, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + } + }, + "extensions": [ + "charliermarsh.ruff", + "GitLab.gitlab-workflow", + "mesonbuild.mesonbuild", + "ms-python.mypy-type-checker", + "ms-python.pylint", + "ms-python.python", + "ms-vscode.cpptools", + "redhat.vscode-xml", + "redhat.vscode-yaml", + "rust-lang.rust-analyzer", + "tamasfe.even-better-toml", + "vadimcn.vscode-lldb" + ] + } + } +} diff --git a/ci/scripts/create-subprojects-cache.sh b/ci/scripts/create-subprojects-cache.sh index 1a174c556b..82571f3bce 100644 --- a/ci/scripts/create-subprojects-cache.sh +++ b/ci/scripts/create-subprojects-cache.sh @@ -8,5 +8,10 @@ git -C /gstreamer submodule update --init --depth=1 meson subprojects download --sourcedir /gstreamer ./ci/scripts/handle-subprojects-cache.py --build --cache-dir /subprojects /gstreamer/subprojects/ +# Avoid the cache being owned by root +# and make sure its readable to anyone +chown containeruser:containeruser --recursive /subprojects/ +chmod --recursive a+r /subprojects/ + # Now remove the gstreamer clone rm -rf /gstreamer