docker中的OWFS错误分段错误(已转储内核)



我尝试在docker容器中运行owfs来解析单线温度值。运行时

owfs -C -uall -m /mnt/1wire --allow_other

在集装箱里我收到这个错误Segmentation fault (core dumped)

在主机系统上,我可以运行相同的设置&到目前为止没有问题的命令:我不知道如何调试它以找到错误/解决方案,非常感谢提示/解决方案!

我的设置如下,Dockerfile:

FROM python:3.8-slim-buster
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y

COPY ds2490 /etc/modeprobe.d/ds2490
RUN apt-get install owfs -y
RUN apt-get install libtool automake libftdi-dev libusb-dev libusb-1.0.0-dev uthash-dev -y
RUN apt-get install usbutils -y
COPY owfs.conf /etc/owfs.conf
COPY fuse.conf /etc/fuse.conf
RUN mkdir /mnt/1wire
WORKDIR onewire
COPY ./docker_entrypoint.sh ./docker_entrypoint.sh
RUN chmod +x ./docker_entrypoint.sh
COPY ./parse_onewire.py ./parse_onewire.py
RUN chmod +x parse_onewire.py
ENTRYPOINT ./docker_entrypoint.sh

docker-compose.yml:

version: "3"
services:
onewire_parser:
container_name: 'onewire'
build: .
volumes:
- /dev/bus/usb:/dev/bus/usb
privileged: true
stdin_open: true
tty: true
restart: unless-stopped

ds2490:

blacklist ds2490
blacklist ds9490r
blacklist wire

fuse.conf:

#Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000
# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
user_allow_other

owfs.conf:

######################## SOURCES ########################
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
# USB device: DS9490
server: usb = all
# Serial port: DS9097
#server: device = /dev/ttyS1
# owserver tcp address
#server: server = 192.168.10.1:3131
# random simulated device
#server: FAKE = DS18S20,DS2405
######################### OWFS ##########################
mountpoint = /mnt/1wire
allow_other
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = localhost:4304

docker_entrypoint.sh:

#!/bin/bash
owfs -C -uall -m /mnt/1wire --allow_other

我不太确定为什么,但将装载方向从/mnt/1wire更改为/opt/1wire解决了这个问题。我留下了原帖子中提到的所有其他内容。

也许有人能解释一下?

最新更新