-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 936 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:1
FROM python:3.10-slim-buster
ENV DEBIAN_FRONTEND noninteractive
ENV TZ="America/Costa_Rica"
WORKDIR /home
RUN groupadd -g 1000 sneer
RUN useradd -u 1000 -g sneer sneer
# Install package dependencies
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
alsa-utils \
libsndfile1-dev \
pulseaudio-utils \
pulseaudio && \
apt-get clean
# Create PulseAudio configuration for the container user
RUN mkdir -p /home/sneer/.config/pulse && \
cp /etc/pulse/client.conf /home/sneer/.config/pulse && \
chown -R sneer:sneer /home/sneer/.config/pulse
# Set PulseAudio variables for the container user
ENV PULSE_SERVER=unix:/run/user/1000/pulse/native
ENV XDG_RUNTIME_DIR=/run/user/1000
# Change the user and group
COPY --chown=sneer:sneer . .
RUN pip3 install -r requirements.txt
USER sneer
CMD [ "python3", "speakerManager/speakerManager.py"]