docker-frp/README.md

57 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2020-07-09 07:51:02 +00:00
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2020-10-07 01:17:51 +00:00
[![Build Status](https://ci.quacker.org/api/badges/d/docker-frp/status.svg)](https://ci.quacker.org/d/docker-frp)
2020-07-09 07:51:27 +00:00
# docker-frp
2020-10-07 01:10:57 +00:00
Docker image for frp. Binaries directly obtained from the official frp repo [fatedier/frp](https://github.com/fatedier/frp).
2020-07-09 07:53:32 +00:00
2020-10-07 01:08:46 +00:00
The instructions below apply to `docker-compose`.
2020-07-09 07:53:32 +00:00
2020-10-07 01:08:46 +00:00
# Networking
We recommend using the `network_mode = host` (host network) option.
Otherwise you would need to manually expose the listening port as well as all the reverse proxied ports.
# Environment variables
`SERVER`. Defaults to 0 = client mode. 1 = server mode.
# Volumes
Note the difference in file names (frps.ini vs frpc.ini)
## Client mode
Client configuration file `frpc.ini` -> `/opt/frp/frpc.ini`
## Server mode
Server configuration file `frps.ini` -> `/opt/frp/frps.ini`
# docker-compose
## Sample Client
```
version: "2.1"
services:
frp:
image: quackerd/frp
container_name: frp
network_mode: host
restart: unless-stopped
volumes:
- ./config/frpc.ini:/opt/frp/frpc.ini
```
## Sample Server
```
version: "2.1"
services:
frp:
image: quackerd/frp
container_name: frp_srv
network_mode: host
restart: unless-stopped
environment:
- SERVER=1
volumes:
- ./config/frps.ini:/opt/frp/frps.ini
```
2020-10-07 01:22:05 +00:00
# Troubleshooting
2020-10-09 15:23:30 +00:00
The logs can be obtained by `docker logs <container_name>`. They are usually very self-explanatory.