1panel能不能安装casdoor

请问1panel可以安装casdoor吗?

如果可以,请问应该如何做。

目前我通过casdoor-all-in-one 这个全家桶可以在1panel 正常运行,但是使用casdoor 这个镜像就遇到问题,没法使用。

以下是我的安装方法,请大家帮忙看看哪里不对。

尝试方法:

方法一:使用演示镜像 (成功)

1、使用演示镜像:casbin/casdoor-all-in-one

在casbin/casdoor-all-in-one中,casdoor二进制文件、mysql数据库和所有必要的配置都打包在一起。 这个镜像是为了让新用户能够快速试用Casdoor。 通过这个镜像,您可以使用一两个命令而不是复杂的配置即可启动Casdoor

2、创建容器

结论:此种方法成功,但是里面的数据库用户名和密码都是简单的。

方法二:使用 docker-compose

1、在/opt/1panel/docker/compose 使用 git clone GitHub - casdoor/casdoor: An open-source UI-first Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, RADIUS, Google Workspace, Active Directory and Kerberos

2、在 编排 > 路径选择 /opt/1panel/docker/compose/casdoor/docker-compose.yml

最后casdoor-casdoor 这个容器一直显示重启

3、如果在/opt/1panel/docker/compose/casdoor 目录使用 docker-compose up,就提示

服务内部错误: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/opt/1panel/docker/compose/casdoor/conf/app.conf” to rootfs at “/conf”: mount /opt/1panel/docker/compose/casdoor/conf/app.conf:/conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

方法三:直接尝试使用标准镜像

1、在终端输入 docker run -p 8000:8000 -v /opt/1panel/docker/compose/casdoor/conf/app.conf:/conf casbin/casdoor:latest

出现以下错误:

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/opt/1panel/docker/compose/casdoor/conf/app.conf” to rootfs at “/conf”: mount /opt/1panel/docker/compose/casdoor/conf/app.conf:/conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
ERRO[0026] error waiting for container:

目录挂载的问题。宿主机文件对应容器内目录肯定是要报错的,可以修改为 ./conf:/conf/ 试一下

使用docker-compose方式还是不行