forked from Spotifyd/spotifyd
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
26 lines (16 loc) · 659 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
FROM rust:1.66-bullseye as build
ARG BRANCH=master
WORKDIR /usr/src/spotifyd
RUN apt-get -yqq update && \
apt-get install --no-install-recommends -yqq libasound2-dev && \
git clone --branch=${BRANCH} https://github.com/Spotifyd/spotifyd.git .
RUN cargo build --release
FROM debian:buster-slim as release
CMD ["/usr/bin/spotifyd", "--no-daemon"]
RUN apt-get update && \
apt-get install -yqq --no-install-recommends libasound2 && \
rm -rf /var/lib/apt/lists/* && \
groupadd -r spotify && \
useradd --no-log-init -r -g spotify -G audio spotify
COPY --from=build /usr/src/spotifyd/target/release/spotifyd /usr/bin/
USER spotify