spotifyd-docker/Dockerfile

26 lines
776 B
Docker
Raw Normal View History

2023-08-26 21:40:56 +00:00
FROM --platform=$BUILDPLATFORM debian:bullseye-slim as build
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
ENV SPOTIFYD_VERSION=v0.3.5
ENV URL=https://github.com/Spotifyd/spotifyd/releases/download/${SPOTIFYD_VERSION}/spotifyd-linux-armhf-full.tar.gz
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
RUN apt-get update && \
apt-get install -yqq --no-install-recommends ca-certificates wget
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
RUN wget ${URL} -O - | tar -xz && chmod +x /spotifyd
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
FROM --platform=$TARGETPLATFORM debian:bullseye-slim
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
COPY --from=build /spotifyd /app/spotifyd
COPY start.sh /app/start.sh
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
RUN apt-get update && \
apt-get install -yqq --no-install-recommends ca-certificates libdbus-1-3 libasound2 && \
useradd -r -s /bin/false spotifyd && \
usermod -a -G audio spotifyd && \
chown -R spotifyd:spotifyd /app
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
USER spotifyd
WORKDIR /app
2022-02-05 23:52:44 +00:00
2023-08-26 21:40:56 +00:00
ENTRYPOINT [ "/app/start.sh" ]