2019-01-25 20:28:46 +00:00
|
|
|
FROM debian as builder
|
|
|
|
LABEL maintainer michel.promonet@free.fr
|
|
|
|
WORKDIR /v4l2rtspserver
|
|
|
|
COPY . /v4l2rtspserver
|
|
|
|
|
2019-03-31 14:34:58 +00:00
|
|
|
ARG ARCH=armv7l
|
|
|
|
|
2019-01-26 11:20:48 +00:00
|
|
|
RUN apt-get update \
|
2019-04-01 22:56:42 +00:00
|
|
|
&& apt-get install -y --no-install-recommends ca-certificates xz-utils cmake make pkg-config git wget \
|
|
|
|
&& git clone --depth 1 https://github.com/raspberrypi/tools.git /rpi_tools \
|
|
|
|
&& export PATH=/rpi_tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:$PATH \
|
2019-03-31 14:34:58 +00:00
|
|
|
&& cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY . \
|
|
|
|
&& make install \
|
2019-01-25 20:28:46 +00:00
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/
|
|
|
|
|
|
|
|
|
2019-04-01 22:56:42 +00:00
|
|
|
FROM balenalib/raspberry-pi
|
|
|
|
|
2019-01-25 20:28:46 +00:00
|
|
|
WORKDIR /usr/local/share/v4l2rtspserver
|
|
|
|
COPY --from=builder /usr/local/bin/ /usr/local/bin/
|
2019-01-26 11:20:48 +00:00
|
|
|
COPY --from=builder /usr/local/share/v4l2rtspserver/ /usr/local/share/v4l2rtspserver/
|
2019-01-25 20:28:46 +00:00
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/v4l2rtspserver" ]
|
2019-01-26 11:20:48 +00:00
|
|
|
CMD [ "-S" ]
|