Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过在docker映像中嵌入RF24库构建_Docker - Fatal编程技术网

通过在docker映像中嵌入RF24库构建

通过在docker映像中嵌入RF24库构建,docker,Docker,我想在docker映像中嵌入RF24库。 为此,我在Dockerfile中包含了以下语句: FROM arm32v7/node:10 RUN mkdir -p /home/node WORKDIR /home/node COPY package*.json ./ USER root RUN apt-get update -y && apt-get install -y sudo git RUN git clone https://github.com/nRF24/RF2

我想在docker映像中嵌入RF24库。 为此,我在Dockerfile中包含了以下语句:

FROM arm32v7/node:10

RUN mkdir -p /home/node
WORKDIR /home/node

COPY package*.json ./

USER root

RUN apt-get update -y && apt-get install -y sudo git

RUN git clone https://github.com/nRF24/RF24.git
RUN cd RF24 && make && sudo make install

RUN npm install

EXPOSE 3000
CMD ["npm","start"]
然而,当我在Raspberry pi3上执行docker构建时,我注意到发生了以下错误

[Running configure]
[SECTION] Detecting arm compilation environment.
  [OK] arm-linux-gnueabihf-gcc detected.
  [OK] arm-linux-gnueabihf-g++ detected.
[SECTION] Detecting target machine.
[OK] machine detected: SoC=BCM2835, Type=unknown, CPU=armv7l.
[SECTION] Detecting DRIVER
  [OK] DRIVER detected:RPi.
[SECTION] Detecting OS.
  [INFO] OS detected:LINUX.
[SECTION] Preparing configuration.
[SECTION] Saving configuration.
[OK] Finished.
arm-linux-gnueabihf-g++ -fPIC -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -c RF24.cpp
In file included from /usr/include/stdio.h:935:0,
                 from utility/RPi/RF24_arch_config.h:8,
                 from utility/includes.h:7,
                 from RF24_config.h:43,
                 from RF24.cpp:10:
/usr/include/arm-linux-gnueabihf/bits/stdio.h: In function 'int vprintf(const char*, __gnuc_va_list)':
/usr/include/arm-linux-gnueabihf/bits/stdio.h:36:56: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 vprintf (const char *__restrict __fmt, _G_va_list __arg)
                                                        ^
Makefile:42: recipe for target 'RF24.o' failed
奇怪的是,我没有使用Docker,
当我直接在bashshell中键入命令时,会得到不同的结果

投入如下

cd ~
git clone https://github.com/nRF24/RF24.git
cd RF24 && make && sudo make install
这就是结果

[Running configure]
[SECTION] Detecting arm compilation environment.
  [OK] arm-linux-gnueabihf-gcc detected.
  [OK] arm-linux-gnueabihf-g++ detected.
[SECTION] Detecting target machine.
./configure: line 66: warning: command substitution: ignored null byte in input
[OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv7l.
[SECTION] Detecting DRIVER
  [OK] DRIVER detected:RPi.
[SECTION] Detecting OS.
  [INFO] OS detected:LINUX.
[SECTION] Preparing configuration.
[SECTION] Saving configuration.
[OK] Finished.
arm-linux-gnueabihf-g++ -fPIC -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -c RF24.cpp
arm-linux-gnueabihf-g++ -fPIC -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -c utility/RPi/spi.cpp
arm-linux-gnueabihf-gcc -fPIC -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -c utility/RPi/bcm2835.c
arm-linux-gnueabihf-g++ -fPIC -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -c utility/RPi/interrupt.c
[Linking]
arm-linux-gnueabihf-gcc -shared -Wl,-soname,librf24.so.1 -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Ofast -Wall -pthread  -o librf24.so.1.3.1 RF24.o spi.o bcm2835.o interrupt.o -pthread
我对这个结果太困惑了。
有人请帮帮我。

请回答您的问题,并将错误直接写为文本,而不是图像。我根据您的建议对其进行了修改。谢谢你成为一个好的转折点。请把你的问题和错误直接写成文本,而不是图片。我根据你的建议修改了它。谢谢你成为一个好的转折点。