FROM rust as build WORKDIR /build RUN apt-get -yqq update && \ apt-get install --no-install-recommends -yqq libasound2-dev && \ git clone --branch=master https://github.com/Spotifyd/spotifyd.git . RUN cargo build --release --features alsa_backend FROM debian:bullseye-slim 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 USER spotify COPY --from=build /build/target/release/spotifyd /spotifyd COPY start.sh /start.sh WORKDIR / ENTRYPOINT [ "/start.sh" ]