Skip to content

Instantly share code, notes, and snippets.

@itsdsk
Last active January 29, 2018 18:11
Show Gist options
  • Save itsdsk/6dfebb26be70fe3f546144931554f38c to your computer and use it in GitHub Desktop.
Save itsdsk/6dfebb26be70fe3f546144931554f38c to your computer and use it in GitHub Desktop.
OF RPi headless
# use raspbian stretch image as container base
FROM resin/raspberrypi3-debian:stretch
# install deps
RUN apt-get update && apt-get -y install \
libraspberrypi-dev \
raspberrypi-kernel-headers \
mesa-utils \
libgl1-mesa-glx \
rsync \
git \
wget \
build-essential \
make \
xvfb \
libxrender1 \
libxtst6 \
libxi6 \
&& apt-get upgrade \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# enable systemd init system in the container
ENV INITSYSTEM on
# install openframeworks
RUN cd ~ && git clone --depth=1 https://github.com/itsdsk/openFrameworks.git
RUN cd ~/openFrameworks/scripts/linux/debian && ./install_dependencies.sh
RUN cd ~/openFrameworks/scripts/linux/debian && ./install_codecs.sh
RUN cd ~/openFrameworks/scripts/linux && ./download_libs.sh --platform linuxarmv6l
RUN cp ~/openFrameworks/scripts/templates/linuxarmv6l/Makefile ~/openFrameworks/examples/templates/emptyExample/
ENV DISPLAY :1
RUN Xvfb :1 -screen 0 256x256x24+32 & \
export DISPLAY=":1" \
&& cd ~/openFrameworks/examples/templates/emptyExample/ \
&& make HOST_ARCH=armv6l PLATFORM_ARCH=armv6l -j2 -s
# please note: there may be redundant commands in this Dockerfile leftover from testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment