Last active
December 20, 2016 22:54
-
-
Save herrernst/1034b85986656a15943b13156f337d63 to your computer and use it in GitHub Desktop.
Dockerfile to build librespot on Ubuntu Trusty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
RUN dpkg --add-architecture armhf | |
RUN sed -i 's/deb /deb [arch=amd64,i386] /g' /etc/apt/sources.list | |
RUN sed -i 's/deb-src /#deb-src /g' /etc/apt/sources.list | |
RUN echo "deb [arch=armhf] http://ports.ubuntu.com/ trusty main" >> /etc/apt/sources.list | |
RUN echo "deb [arch=armhf] http://ports.ubuntu.com/ trusty-security main" >> /etc/apt/sources.list | |
RUN echo "deb [arch=armhf] http://ports.ubuntu.com/ trusty-updates main" >> /etc/apt/sources.list | |
RUN apt-get -y update | |
RUN apt-get install -y gcc-arm-linux-gnueabihf libasound2:armhf libasound2-dev:armhf | |
RUN apt-get install -y gcc g++ git curl pkg-config libprotoc-dev file | |
RUN curl -o /usr/local/bin/rustup.sh https://static.rust-lang.org/rustup.sh | |
RUN chmod +x /usr/local/bin/rustup.sh | |
RUN rustup.sh --disable-sudo | |
RUN rustup.sh --disable-sudo --add-target=armv7-unknown-linux-gnueabihf | |
RUN cd && git clone https://github.com/plietar/librespot && cd librespot && cargo fetch | |
RUN echo '[target.armv7-unknown-linux-gnueabihf]' > ~/.cargo/config | |
RUN echo 'linker = "arm-linux-gnueabihf-gcc"' >> ~/.cargo/config | |
CMD cd $HOME/librespot && git checkout add-simple-alsa-backend && git pull && cargo build --release --target armv7-unknown-linux-gnueabihf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO how get result out of container
Not in the intention of the inventor: https://github.com/jpetazzo/nsenter/issues/27#issuecomment-229570122