devcontainer: enable audio playback
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
FROM mcr.microsoft.com/devcontainers/go:2-1.24-bookworm
|
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
|
USER vscode
|
||||||
RUN go install fyne.io/fyne/v2/cmd/fyne@latest
|
RUN go install fyne.io/fyne/v2/cmd/fyne@latest
|
||||||
|
|||||||
@@ -14,6 +14,14 @@
|
|||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"VNC_RESOLUTION": "1920x1080x24",
|
"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": {
|
"onCreateCommand": {
|
||||||
"log": "echo 'Starting post-create script...'",
|
"log": "echo 'Starting post-create script...'",
|
||||||
"go": ".devcontainer/init-go.sh",
|
"go": ".devcontainer/init-go.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user