fixes dockerfiles

This commit is contained in:
Robin Müller 2021-05-24 15:45:57 +02:00 committed by Robin Mueller
parent 80fe900bd4
commit a25cea8d4d
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,37 @@
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"]

View File

@ -9,7 +9,7 @@ RUN mkdir -p /usr/rootfs; \
| tar xvz -C /usr/rootfs | tar xvz -C /usr/rootfs
# Q7S C++ cross-compiler # Q7S C++ cross-compiler
RUN mkdir -p /usr/tools; \ RUN mkdir -p /usr/tools; \
curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/2Fp2ag6NGnbtAsK/download/gcc-arm-linux-gnueabi.tar.gz usr/tools \ curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/2Fp2ag6NGnbtAsK/download/gcc-arm-linux-gnueabi.tar.gz \
| tar xvz -C /usr/tools | tar xvz -C /usr/tools
# RUN apk add cmake make g++ # RUN apk add cmake make g++