问题描述

docker 启动 frps 容器的时候报错:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/frp/frps.ini\\\" to rootfs \\\"/var/lib/docker/overlay2/8ea0d801cf4a1be9f9aeb5e23bcc38cf59e07d3ad441c84a95976a5bc9f921ed/merged\\\" at \\\"/var/lib/docker/overlay2/8ea0d801cf4a1be9f9aeb5e23bcc38cf59e07d3ad441c84a95976a5bc9f921ed/merged/etc/frp/frps.ini\\\" caused \\\"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.

原因

/etc/frps/frps.init caused "not a directory
初次拉取的时候把 /etc/frps/frps.init 新建成了目录

解决办法

删除目录、新建文件

[root@izuf64gdegum84eku07pljz ~]# rm /etc/frp/frps.ini/ -rf
[root@izuf64gdegum84eku07pljz ~]# ll /etc/frp/
total 0
[root@izuf64gdegum84eku07pljz ~]# touch /etc/frp/frps.ini