justxuewei/cloudreve-docker

cloudreve-docker,无法运行。

jy3344511 opened this issue · 17 comments

1.执行以下命令后:
docker pull xavierniu/cloudreve:3.0.0-arm64v8

2.mkdir -p /opt/120
&& touch /opt/120/conf.ini
&& touch /opt/120/cloudreve.db

3.docker run -d
--name cloudreve
-e PUID=0 \
-e PGID=0 \
-e TZ=Asia/Shanghai \
-p 5212:5212 \
--restart=unless-stopped
-v /opt/110:/cloudreve/uploads
-v /opt/120:/cloudreve/conf.ini
-v /opt/120:/cloudreve/cloudreve.db
xavierniu/cloudreve:3.0.0-arm64v8

4.报错:
docker run -d \

--name cloudreve
-e PUID=0 \
erniu/cloudreve:3.0.0-arm64v8docker: invalid reference format.
See 'docker run --help'.
root@OpenWrt:# -e PGID=0 \
-ash: -e: not found
root@OpenWrt:
# -e TZ=Asia/Shanghai \
-ash: -e: not found
root@OpenWrt:# -p 5212:5212 \
-ash: -p: not found
root@OpenWrt:
# --restart=unless-stopped
-v /opt/110:/cloudreve/uploads
-v /opt/120:/cloudreve/conf.ini
-v /opt/120:/cloudreve/cloudreve.db
xavierniu/cloudreve:3.0.0-arm64v8
-ash: --restart=unless-stopped: not found

你的命令有错:

docker run -d
--name cloudreve

这个地方如果换行,需要用 \来连接。

另外请使用code block(```)添加代码,现在的可读性太差。

你的命令有错:

docker run -d
--name cloudreve

这个地方如果换行,需要用 \来连接。

image

用了\的,github上显示有问题

你需要检查\后面是不是有空格,如果是\空格会出错。

建议你使用code block来填入代码,这样错误更容易追溯,请参考:https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks

你需要检查\后面是不是有空格,如果是\空格会出错。

建议你使用code block来填入代码,这样错误更容易追溯,请参考:https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks

image

docker运行成功了,但发现显示的不对,无法通过ip:5212进行访问

请检查网络设置,可能是防火墙配置的问题,建议先在本地测试。

不过我看到你的Published Ports是空的,你可以先检查启动命令是不是正确的。

请检查网络设置,可能是防火墙配置的问题,建议先在本地测试。

不过我看到你的Published Ports是空的,你可以先检查启动命令是不是正确的。

image

cloudreve这里显示的IP地址,一会有,一会没有,但是像其它docker的IP地址,就一直是显示的,比如:emby。

image

刷新下网页,你看cloudreve的IP地址,又不显示了,网络我试了下是OK的,emby、
qBittorrent都可以正常使用。

image

这个问题应该就不是镜像的问题了,麻烦检查一下你的本地环境或者查看一下该镜像的log。

这个问题应该就不是镜像的问题了,麻烦检查一下你的本地环境或者查看一下该镜像的log。

镜像我换了两个版本了,真找不到问题了。

这个问题应该就不是镜像的问题了,麻烦检查一下你的本地环境或者查看一下该镜像的log。

https://hub.docker.com/r/jialezi/cloudreve

我在虚拟机上跑openwrt x64,拉了上面的镜像,可以使用。但使用xavierniu/cloudreve的amd64 docker镜像,在虚拟机中,docker可以运行,也无法使用。

问题在于,本机是arm64架构的软路由,搜遍全网,只有xavierniu/cloudreve提供了arm64的docker镜像。

01

如果真的是我的dockerfile有问题,现在有4.7k+的拉取次数了,应该有很多人报告这个问题的,但是目前只有你出了这个问题。其次,每个人的本地环境都很复杂,所以我这边也不可能凭空给你诊断问题。

我提供给你一个调试思路:

  • 删除全部相关镜像、容器,使用我提供的bash命令完整执行,而不是使用GUI启动
  • 在启动后,执行docker logs -f cloudreve确定启动正常
  • 在本地使用curl -i localhost:5212进行测试,如果数据返回正常则说明端口暴露正常
  • 在用ip:5212进行测试,如果不可以则大概率为防火墙设置问题

如果你重复之后依然存在问题,建议你参照jialezi/cloudreve自行构建ARM版本docker镜像。

行构建A

[Panic] 2020-05-12 21:30:52 无法解析配置文件 '/cloudreve/conf.ini': BOM: read /cloudreve/conf.ini: is a directory
panic: 无法解析配置文件 '/cloudreve/conf.ini': BOM: read /cloudreve/conf.ini: is a directory

goroutine 1 [running]:
github.com/HFO4/cloudreve/pkg/util.(*Logger).Panic(0x40002dc230, 0xdf2241, 0x21, 0x40002afb88, 0x2, 0x2)
/ProjectCloudreve/Cloudreve/pkg/util/logger.go:68 +0xc4
github.com/HFO4/cloudreve/pkg/conf.Init(0x40001eaee0, 0x13)
/ProjectCloudreve/Cloudreve/pkg/conf/conf.go:110 +0x154
github.com/HFO4/cloudreve/bootstrap.Init(0x40001eaee0, 0x13)
/ProjectCloudreve/Cloudreve/bootstrap/init.go:18 +0x34
main.init.0()
/ProjectCloudreve/Cloudreve/main.go:16 +0x144


/ \ | ___ _ _ | | __ _____ _____
/ / | |/ _ | | | |/ _ | '
/ _ \ \ / / _ \
/ /
| | () | || | (| | | | _/\ V / /
_
/|
|_/ _,|_,|_| _| _/ ___|

V3.0.0 Commit #9910f8d Pro=false

[Panic] 2020-05-12 21:31:45 无法解析配置文件 '/cloudreve/conf.ini': BOM: read /cloudreve/conf.ini: is a directory
panic: 无法解析配置文件 '/cloudreve/conf.ini': BOM: read /cloudreve/conf.ini: is a directory

goroutine 1 [running]:
github.com/HFO4/cloudreve/pkg/util.(*Logger).Panic(0x40002922a0, 0xdf2241, 0x21, 0x400058fb88, 0x2, 0x2)
/ProjectCloudreve/Cloudreve/pkg/util/logger.go:68 +0xc4
github.com/HFO4/cloudreve/pkg/conf.Init(0x400029c460, 0x13)
/ProjectCloudreve/Cloudreve/pkg/conf/conf.go:110 +0x154
github.com/HFO4/cloudreve/bootstrap.Init(0x400029c460, 0x13)
/ProjectCloudreve/Cloudreve/bootstrap/init.go:18 +0x34
main.init.0()
/ProjectCloudreve/Cloudreve/main.go:16 +0x144
root@OpenWrt:~#

这是什么?

你按照教程预创建文件了吗

你按照教程预创建文件了吗

有先做这一步的

mkdir -p /dockercnf/cloudreve
&& touch /dockercnf/cloudreve/conf.ini
&& touch /dockercnf/cloudreve/cloudreve.db

image

不知道你后续的操作,但是根据你提供的第一条信息,你的路径不全,/opt/120后面要跟着conf.ini

不知道你后续的操作,但是根据你提供的第一条信息,你的路径不全,/opt/120后面要跟着conf.ini

可以了,我之前部署其它的容器,像这种的 -v /opt/docker:/config \,都是运行容器后,自动识别/opt/docker目录下的配置文件,cloudreve还要再加一个conf.ini,之前没有这个conf.ini。