Skip to content

Instantly share code, notes, and snippets.

@unalkalkan
Last active May 6, 2021 23:39
Show Gist options
  • Save unalkalkan/c998b6a7ecb81c2dd09818f00d99b6b3 to your computer and use it in GitHub Desktop.
Save unalkalkan/c998b6a7ecb81c2dd09818f00d99b6b3 to your computer and use it in GitHub Desktop.
Updated Dockerfile for running moonlight-embedded on LibreELEC/Raspberry Pi systems. This Dockerfile clones the repository and builds it instead of obtaining the package from the package manager.
# Moonlight embedded for libreelec
# See https://github.com/clarkemw/moonlight-embedded-launcher for installation instructions
# See https://github.com/irtimmer/moonlight-embedded/wiki/Usage for command instructions
#
# Run syntax:
# docker run -it -v moonlight-home:/home/moonlight-user \
# -v /var/run/dbus:/var/run/dbus --device /dev/vchiq:/dev/vchiq \
# moonlight [action] (options) [host]
#
FROM raspbian/stretch
RUN sudo apt-get update
# Install necessary packages for compiling
RUN sudo apt-get install -y git \
libopus0 libexpat1 libasound2 \
libudev1 libavahi-client3 \
libevdev2 libenet7 \
libssl-dev libopus-dev \
libasound2-dev libudev-dev \
libavahi-client-dev libcurl4-openssl-dev \
libevdev-dev libexpat1-dev \
libpulse-dev uuid-dev libenet-dev \
cmake gcc g++ fakeroot debhelper
# Raspbian only
RUN sudo apt-get install -y libraspberrypi-dev
# Clone the project and build.
RUN git clone --recursive https://github.com/irtimmer/moonlight-embedded.git /opt/moonlight-embedded
RUN mkdir /opt/moonlight-embedded/build
WORKDIR /opt/moonlight-embedded/build
RUN cmake ..
RUN make
RUN sudo make install
RUN ldconfig
# Create directory for saved data
ENV HOME /home/moonlight-user
RUN mkdir -p $HOME
# $HOME will be exposed as a docker mount so the data is persistent
VOLUME $HOME
EXPOSE 80
ENTRYPOINT [ "/usr/local/bin/moonlight" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment