# Audio in containers on IEN ## Requires: - Retail Device Manager - Audio ## Usage Instructions: ### Audio Client Create the following Dockerfile: ```Dockerfile FROM alpine:latest RUN apk update && apk add --no-cache \ alsa-lib \ alsa-utils \ pulseaudio \ pulseaudio-alsa \ pulseaudio-utils COPY [AUDIO_FILE] /[AUDIO_FILE] ``` Build this image locally and upload the image to the IEN ### IEN: Import client images into local container registry Label nodes you want Audio enabled on: - `kubectl label nodes node.ncr.com/class=touchpoint` Apply the following manifest for an audio client pod. ```yaml apiVersion: v1 kind: Pod metadata: name: audio-client spec: containers: - # Uncomment one of these lines command: ["paplay", "-p", "/[AUDIO_FILE]"] # This is a pulseaudio playback test env: - name: XDG_RUNTIME_DIR value: /tmp/xdg_runtime - name: PULSE_SERVER value: /tmp/xdg_runtime/pa.socket image: audio-client:latest imagePullPolicy: IfNotPresent name: audio-client volumeMounts: - mountPath: /tmp/runtime name: xdg-runtime readOnly: false nodeSelector: node.ncr.com/class: touchpoint volumes: - hostPath: path: /tmp/runtime type: Directory name: xdg-runtime ```