self-hosted-deployment/spotify/Dockerfile
2023-01-01 18:43:58 -05:00

30 lines
837 B
Docker

FROM ubuntu
# Install base dependencies
RUN apt-get update && apt-get install -y curl gnupg locales pulseaudio
# Set the locale/TZ
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV TZ America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install tzdata
# Set up the virtual display
RUN apt-get install -y xvfb
ENV DISPLAY :1
# Install spotify
RUN curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | apt-key add -
RUN echo "deb http://repository.spotify.com stable non-free" | tee /etc/apt/sources.list.d/spotify.list
RUN apt-get update && apt-get install -y spotify-client
# Start
ADD start.sh /
RUN chmod +x /start.sh
CMD ["/start.sh"]