基于 fatedier/frp 原版 frp 内网穿透客户端 frpc 的 docker 镜像.
- GitHub tothemoon96/frpc
- Docker tothemoon/frpc
export DOCKER_HOST_IP=$(route -n | awk '/UG[ \t]/{print $2}')
# frpc.ini
[common]
server_addr = {{ .Envs.FRP_SERVER_ADDR }}
server_port = 7000
为避免因 frpc.ini 文件的挂载,格式或者配置的错误导致容器无法正常运行并循环重启.请确保先配置好 frpc.ini 后在运行启动. 执行以下命令启动服务
docker run -d --name=frpc --restart=always \
-v /root/frpc/frpc.ini:/frp/frpc.ini \
tothemoon/frpc
服务运行中修改 frpc.ini 配置后需重启 frpc 服务.
vi /root/frp/frpc.ini
# 修改 frpc.ini 配置
docker restart frpc
# 重启 frpc 容器即可生效