Integrate the RealSense library in Balena ecosystem

I’m executing these steps in the web ssh console and they execute correctly in the Ubuntu image:

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
sudo apt-get install -y git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev cmake libglfw3-dev build-essential
git clone GitHub - IntelRealSense/librealsense: Intel® RealSense™ SDK
cd librealsense/ && ./scripts/setup_udev_rules.sh
mkdir build && cd build
cmake …/ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release && make all -j4 && sudo make all

However when I try to push this dockerfile:

FROM resin/%%RESIN_MACHINE_NAME%%-ubuntu:xenial

RUN sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
RUN sudo apt-get install -y git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev cmake libglfw3-dev build-essential
RUN git clone GitHub - IntelRealSense/librealsense: Intel® RealSense™ SDK
RUN cd librealsense/ && ./scripts/setup_udev_rules.sh
CMD mkdir build && cd build
RUN cmake /librealsense/ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release && make all -j4 && sudo make all

#switch on systemd init system in container
ENV INITSYSTEM on

#Run our binary on container startup
CMD /librealsense/examples/hello-realsense/rs-hello-realsense

And I got this error:

[main] make[1]: *** No rule to make target ‘//all’. Stop.
[main]
[main] make: *** [all] Error 2
[main]
[main] Makefile:127: recipe for target ‘all’ failed
[main] Removing intermediate container 35935127c9a3
[Info] Uploading images
[main] The command ‘/bin/sh -c cmake /librealsense/ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release && make all -j4 && sudo make all’ returned a non-zero code: 2
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: main
[Error] Error: The command ‘/bin/sh -c cmake /librealsense/ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release && make all -j4 && sudo make all’ returned a non-zero code: 2
[Error] Not deploying release.