]> git.parisson.com Git - telecaster-server.git/commitdiff
add jackd startup inside container feature/docker
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 29 Jan 2024 11:27:16 +0000 (12:27 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 29 Jan 2024 11:27:16 +0000 (12:27 +0100)
Dockerfile [new file with mode: 0644]
bin/app.sh [new file with mode: 0755]
docker-compose.yml [new file with mode: 0644]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..1b69c8e
--- /dev/null
@@ -0,0 +1,11 @@
+FROM debian:stretch
+
+RUN apt-get -y update && \
+    apt-get -y install jackd2 dbus-x11 tmux locales vim mpg123
+
+RUN adduser root audio
+
+RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
+
+
+
diff --git a/bin/app.sh b/bin/app.sh
new file mode 100755 (executable)
index 0000000..79c2fde
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+mount -o remount,size=128M /dev/shm
+export `dbus-launch | grep ADDRESS`
+export `dbus-launch | grep PID`
+jackd -R -P70 -dalsa -dhw:0 -r44100 -p1024 -n2 &
+
+sleep 5
+
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644 (file)
index 0000000..5836c49
--- /dev/null
@@ -0,0 +1,19 @@
+version: '3'
+
+services:
+    app:
+        build: .
+        volumes:
+            - /etc/security/limits.d/audio.conf:/etc/security/limits.d/audio.conf
+            - /var/run/dbus:/var/run/dbus
+            - ./bin:/srv/bin
+        privileged: true
+        ulimits:
+            memlock: 128000000
+            rtprio: 90
+        environment:
+            - DISPLAY=:0
+        command: /srv/bin/app.sh
+
+volumes:
+    app: