Closed lhm518 closed 3 years ago
我也遇到这个问题, 是因为一开始你没有/etc/frp/frps.ini这个文件, docker映射的时候在内部创建了一个文件夹, 后续都失败了. 你需要:
docker ps -a
docker rm -v <你旧的docker的名字>
rm -rf /etc/frp/frps.ini && touch /etc/frp/frps.ini
最后再运行:
docker run --restart=always --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting "/etc/frp/frps.ini" to rootfs at "/var/lib/docker/overlay2/c0c54fc57d0f1d2af10c1eafa8c40832725cad331dc2862f15cdd1adc9ae613b/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.
You need create your own frp config file: /etc/frp/frps.ini (for frps)or /etc/frp/frpc.ini (for frpc) Then you can download and run the docker image.
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting "/etc/frp/frps.ini" to rootfs at "/var/lib/docker/overlay2/c0c54fc57d0f1d2af10c1eafa8c40832725cad331dc2862f15cdd1adc9ae613b/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.