-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (24 loc) · 1.32 KB
/
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
FROM ubuntu:18.04
RUN export DEBIAN_FRONTEND=noninteractive TZ=America/Chicago \
&& sed 's;http://archive.;http://us.archive.;g' -i /etc/apt/sources.list \
&& apt-get update && apt-get install -y --no-install-recommends \
add-apt-key ca-certificates curl pulseaudio pulseaudio-utils xvfb x11vnc dbus sudo \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://download.spotify.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb http://repository.spotify.com stable non-free" | tee /etc/apt/sources.list.d/spotify.list \
&& apt-get update && apt-get install -y spotify-client \
&& rm -rf /var/lib/apt/lists/*
RUN USER=docker GROUP=docker HOME=/home/$USER \
&& useradd -u 1000 -m -d $HOME -s /bin/bash $USER \
&& usermod -aG audio $USER \
&& echo "$USER ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USER && chmod 0440 /etc/sudoers.d/$USER \
&& mkdir -p $HOME/.config/pulse && chown -R $USER:$GROUP $HOME \
&& curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - \
&& chown root:root /usr/local/bin/fixuid \
&& chmod 4755 /usr/local/bin/fixuid \
&& mkdir -p /etc/fixuid \
&& printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml
ADD entrypoint.sh /entrypoint.sh
COPY ["default.pa", "/etc/pulse/"]
USER docker:docker
ENTRYPOINT ["/entrypoint.sh"]