add proxy
This commit is contained in:
@ -7,6 +7,8 @@ LABEL description="FRP server and client image"
|
||||
|
||||
# frp 版本
|
||||
ARG FRP_VERSION=0.66.0
|
||||
# 代理地址 (可选)
|
||||
ARG PROXY=""
|
||||
|
||||
# 安装必要依赖并下载 frp
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
@ -14,7 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
tzdata \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fsSL "https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz" \
|
||||
&& curl -fsSL ${PROXY:+-x "$PROXY"} \
|
||||
"https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz" \
|
||||
-o /tmp/frp.tar.gz \
|
||||
&& tar -xzf /tmp/frp.tar.gz -C /tmp \
|
||||
&& mv /tmp/frp_${FRP_VERSION}_linux_amd64/frps /usr/local/bin/ \
|
||||
|
||||
Reference in New Issue
Block a user