diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0533983..d64ee97 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,7 @@ FROM mcr.microsoft.com/devcontainers/go:2-1.24-bookworm -RUN apt-get update && apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev +RUN apt update && apt install -y libmpv-dev gcc libegl1-mesa-dev xorg-dev acl +RUN usermod -aG audio vscode USER vscode RUN go install fyne.io/fyne/v2/cmd/fyne@latest diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dd70d14..5b794e2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,6 +14,14 @@ "containerEnv": { "VNC_RESOLUTION": "1920x1080x24", }, + "runArgs": [ + "--device=/dev/snd:/dev/snd", + "--group-add=audio", + ], + "postStartCommand": "sudo setfacl -m u:vscode:rw /dev/snd/*", + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. "onCreateCommand": { "log": "echo 'Starting post-create script...'", "go": ".devcontainer/init-go.sh",