iobroker-docker部署iobroker

因为iobroker需要占用9000端口,所以安装的时候,就可能有的同学存在着端口冲突。

首先你需要确认主机的9000端口有没有被占用,自己也不确定的同学可以使用 netstat -tunlp 命令自行查询。

1、在任意位置新建一个名为iobroker的文件夹。

2、从如下链接里面下载iobroker.json,objects.json,states.json这三个初始化配置文件,并放在iobroker文件夹下。

https://github.com/dodojie/iobroker_docker

3、根据实际情况选择性运行如下命令。(切勿忘了把下面命令里面的路径替换成你自己的)

一、9000端口没被占用,部署iobroker命令

docker run --restart=always --name=iobroker -e TZ=Asia/Shanghai -v /&此处替换成你自己的实际路径&/iobroker:/opt/iobroker/iobroker-data --net=host buanet/iobroker

二、9000端口已被占用,部署iobroker命令

docker run --restart=always --name=iobroker -e TZ=Asia/Shanghai -v /&此处替换成你自己的实际路径&/iobroker:/opt/iobroker/iobroker-data -p 8081:8081 -p 9099:9000 buanet/iobroker

完成!

等待部署完成,在浏览器输入 http://“your_host_ip”:8081 即可进入iobroker的web管理页面。

docker安装最方便~

启动完成后,由于没有保持状态,从而导致docker停止,建议启动加-i 参数

docker rm -f iobroker;docker run -i --name=iobroker -e TZ=Asia/Shanghai -v $PWD/iobroker-data:/opt/iobroker/iobroker-data -p 8081:8081 buanet/iobroker

你好,我上述方法操作后,容器运行后仍然不能访问8081的端口,也没有被占用的情况,就是打不开admin主页

要把你的具体情况截图反馈处理,这样才能解决到问题啊

怎么不是后台运行? docker运行命令后

docker create
–name=iobroker
-v /volume1/docker/iobroker:/opt/iobroker
-e TZ=Asia/Shanghai
–net=host
buanet/iobroker

ps:试试这个,替换-v 你的文件地址:/opt/iobroker \

下载链接貌似挂了

不用这个啦,你搜一下其他的iobroker安装教程

https://github.com/dodojie/iobroker_docker 这个地址是不是已经改了,链接已经打不开了

obroker-docker部署iobroker教程有没有,我用https://bbs.iobroker.cn/t/topic/425这个安装的时候发现https://github.com/dodojie/iobroker_docker 已经不能用了

(Re)Setting folder permissions (This might take a while! Please be patient!)…
Done.

Fixing “sudo-bug” by replacing sudo in iobroker with gosu…
cp: preserving times for ‘/opt/iobroker/iobroker.bak’: Operation not permitted
Done.

Node.js[571]: …/src/util.cc:188:double node::GetCurrentTimeInMicroseconds(): Assertion `(0) == (uv_gettimeofday(&tv))’ failed.
iobroker: line 6: 571 Aborted gosu iobroker node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js “$@”
/opt/scripts/iobroker_startup.sh: line 199: [: !=: unary operator expected

----- Step 4 of 5: Applying special settings -----

Some adapters have special requirements/ settings which can be activated by the use of environment variables.
For more information take a look at readme.md on Github!


----- Step 5 of 5: ioBroker startup -----

Starting ioBroker…

Node.js[592]: …/src/util.cc:188:double node::GetCurrentTimeInMicroseconds(): Assertion `(0) == (uv_gettimeofday(&tv))’ failed.
/opt/scripts/iobroker_startup.sh: line 505: 592 Aborted gosu iobroker node node_modules/iobroker.js-controller/controller.js
tail: cannot read realtime clock: Operation not permitted

2022-01-17T09:36:56.850264006Z
H2022-01-17T09:36:56.850480805Z ----------------------------------------
C2022-01-17T09:36:56.850746256Z — Image-Version: 0.7.2 latest —
I2022-01-17T09:36:56.850840434Z ----- 2022-01-17 17:36:56 -----
H2022-01-17T09:36:56.850953127Z ----------------------------------------
2022-01-17T09:36:56.851051073Z
82022-01-17T09:36:56.851171840Z Startupscript running…
82022-01-17T09:36:57.161293149Z Node-Version: v8.15.1
82022-01-17T09:36:57.246219288Z NodeJs-Version: v8.15.1
62022-01-17T09:36:58.095321685Z Npm-Version: 6.4.1
!2022-01-17T09:36:58.282922606Z
`2022-01-17T09:36:58.283089216Z If you have any adapters that need the CAP_NET_ADMIN capability,
j2022-01-17T09:36:58.283179620Z you need to start the docker container with the option --cap-add=NET_ADMIN
H2022-01-17T09:36:58.283284455Z and manually add that capability to node
2022-01-17T09:36:58.362708649Z
M2022-01-17T09:36:58.372720346Z First run preparation! Used Hostname: Z4-WD6M
42022-01-17T09:36:58.372906944Z Renaming ioBroker…
n2022-01-17T09:36:58.409222371Z /opt/scripts/iobroker_startup.sh: Zeile 85: iobroker: Kommando nicht gefunden.
32022-01-17T09:36:58.432747395Z ioBroker renamed…
=2022-01-17T09:36:58.432909435Z First run preparation done…
2022-01-17T09:36:58.433549078Z
42022-01-17T09:36:58.433689770Z Cleanup apt-cache…
u2022-01-17T09:36:58.565053022Z sudo: stat konnte nicht auf /etc/sudoers angewendet werden: No such file or directory
Z2022-01-17T09:36:58.565202347Z sudo: Keine gültige sudoers-Quelle gefunden, Programmende
Y2022-01-17T09:36:58.570961808Z sudo: Regelwerks-Plugin konnte nicht initialisiert werden
2022-01-17T09:36:59.674080981Z
?2022-01-17T09:36:59.674253578Z Created /etc/sudoers.d/iobroker
2022-01-17T09:37:00.062498193Z
42022-01-17T09:37:00.062735801Z Starting ioBroker…
32022-01-17T09:37:00.062989008Z ioBroker started…

請問 github 這個 項目移除了,還有 iobroker.json,objects.json,states.json 這三個文件的備份嗎?