This directory contains a small wrapper image around fatedier/frpc that generates an frpc.toml config file from environment variables and then starts frpc. This is a convenience image for use in Docker Compose or other Docker workflows where you just want a simple HTTP proxy.
fatedier/frpc:v0.65.0/usr/bin/frpc from the base image and uses entrypoint.sh).On container start, entrypoint.sh:
FRPC_SUBDOMAIN or FRPC_CUSTOM_DOMAIN is set.FRPC_CONFIG_FILE (default: ./frpc.toml in the container working directory /frp).execs the main container command (by default frpc -c /frp/frpc.toml).FRPC_SERVER: FRP server address (IP or hostname), e.g. frp.example.com.FRPC_TOKEN: FRP auth token used for auth.token.You must also set at least one of:
FRPC_SUBDOMAIN: Subdomain for HTTP proxying (e.g. myapp).FRPC_CUSTOM_DOMAIN: Custom domain for HTTP proxying (e.g. myapp.example.com).If both FRPC_SUBDOMAIN and FRPC_CUSTOM_DOMAIN are unset, the container will exit with an error.
FRPC_CONFIG_FILE: Path to the generated config file inside the container.
./frpc.toml (in /frp).FRPC_SERVER_PORT: Port of the FRP server.
7000.FRPC_PROXY_PORT: Local port of the proxied service.
80.FRPC_PROXY_HOST: Hostname/IP of the local service to proxy.
127.0.0.1.FRPC_PROXY_NAME: Name of the proxy section.
FRPC_PROXY_NAME (if set),FRPC_SUBDOMAIN (if set),FRPC_CUSTOM_DOMAIN.FRPC_USE_COMPRESSION: When set to any non-empty value, enables compression:
transport.useCompression = true into the config.The generated frpc.toml has the general shape:
serverAddr = "<FRPC_SERVER>"
serverPort = <FRPC_SERVER_PORT>
auth.method = "token"
auth.token = "<FRPC_TOKEN>"
[[proxies]]
name = "<resolved section name>"
type = "http"
localIP = "<FRPC_PROXY_HOST>"
localPort = <FRPC_PROXY_PORT>
# Optionally:
# subdomain = "<FRPC_SUBDOMAIN>"
# customDomains = ["<FRPC_CUSTOM_DOMAIN>"]
# transport.useCompression = true
Below is an example docker-compose.yml snippet showing how to use this image.
Note: All values here are sample values only; replace with your own server address, token, and domains.
services:
myapp:
image: nginx:latest
frpc:
image: kajws/frpc:v0.65.0
depends_on:
- myapp
environment:
- FRPC_PROXY_NAME=myapp
- FRPC_PROXY_HOST=myapp
- FRPC_PROXY_PORT=80
- FRPC_SERVER=frp.example.com
- FRPC_TOKEN=change-me-token
# Use exactly one of the following, or both if you want:
# - FRPC_CUSTOM_DOMAIN=myapp.example.com
- FRPC_SUBDOMAIN=myapp
- FRPC_USE_COMPRESSION=true
Content type
Image
Digest
sha256:257496123…
Size
9.7 MB
Last updated
10 months ago
docker pull kajws/frpc:v0.65.0