-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
52 lines (39 loc) · 1.09 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM resin/%%RESIN_MACHINE_NAME%%-debian as builder
RUN apt-get update &&\
apt-get install -y \
cmake \
g++ \
gcc \
git \
make \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /builder/
# All path binaries SHOULD end up in /usr/local/
# Get InertialSenseCLTool
RUN git clone https://github.com/inertialsense/InertialSenseSDK.git &&\
cd InertialSenseSDK &&\
git reset --hard 1.1.3 &&\
cd InertialSenseCLTool &&\
mkdir build &&\
cd build &&\
cmake .. &&\
make -j$(nproc) &&\
mv ./bin/cltool /usr/local/bin/cltool
# Get wiringPi
RUN git clone git://git.drogon.net/wiringPi wiringPi &&\
cd wiringPi &&\
./build
COPY ./scripts/btnmgr/ /builder/btnmgr
RUN cd /builder/btnmgr &&\
g++ -Wall -o btnmgr main.cpp -lwiringPi &&\
mv btnmgr /usr/local/bin/
# usermod -a -G dialout $USER
# usermod -a -G plugdev $USER
FROM resin/%%RESIN_MACHINE_NAME%%-debian
WORKDIR /usr/src/app/
COPY --from=builder /usr/local/ /usr/local/
COPY --from=builder /usr/lib/libwiringPi* /usr/lib/
COPY ./bin/ /usr/local/bin/
COPY ./app/ /usr/src/app/
ENV INITSYSTEM on
CMD ./start.sh