FROM ubuntu:latest # FROM alpine:latest RUN apt-get update && apt-get install -y curl wget cmake g++ # Raspberry Pi rootfs RUN mkdir -p /usr/rootfs; \ curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/kJe3nCnGPRGKFCz/download/rpi-rootfs.tar.gz /usr/rootfs \ | tar xvz -C /usr/rootfs # Raspberry Pi toolchain RUN mkdir -p /opt; \ cd /opt; \ wget https://github.com/Pro/raspi-toolchain/releases/latest/download/raspi-toolchain.tar.gz; \ tar xfz raspi-toolchain.tar.gz --strip-components=1 -C .; \ rm -rf raspi-toolchain.tar.gz # RUN apk add cmake make g++ # Required for cmake build ENV RASPBERRY_VERSION="4" ENV RASPBIAN_ROOTFS="/usr/rootfs/rootfs" ENV PATH=$PATH:"/opt/cross-pi-gcc/bin" ENV CROSS_COMPILE="arm-linux-gnueabihf" WORKDIR /usr/src/app COPY . . RUN set -ex; \ rm -rf build-rpi; \ mkdir build-rpi; \ cd build-rpi; \ cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux -DTGT_BSP="arm/raspberrypi" ..; ENTRYPOINT ["cmake", "--build", "build-rpi"] CMD ["-j"] # CMD ["bash"]