mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-07 16:41:55 +00:00
add frp
This commit is contained in:
parent
1af05679f1
commit
127cd7e584
20
frp/v0.21.0/Dockerfile
Normal file
20
frp/v0.21.0/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM alpine:3.8
|
||||
|
||||
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||
|
||||
USER root
|
||||
|
||||
# Prerequisites
|
||||
RUN apk add --no-cache openssl
|
||||
|
||||
# Install frp
|
||||
ENV FRP_VER 0.21.0
|
||||
|
||||
RUN wget -O frp.tar.gz https://github.com/fatedier/frp/releases/download/v$FRP_VER/frp_$FRP_VER_linux_amd64.tar.gz && \
|
||||
tar -xzf frp.tar.gz -C / && rm frp.tar.gz
|
||||
|
||||
RUN ln -s /frp_$FRP_VER_linux_amd64 /frp
|
||||
|
||||
WORKDIR /frp
|
||||
|
||||
CMD ["/frp/frps", "-c /frp/frps.ini"]
|
33
frp/v0.21.0/README.md
Normal file
33
frp/v0.21.0/README.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Deploy frps / frpc with docker
|
||||
|
||||
## Start frps
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name frps \
|
||||
--hostname frps \
|
||||
--network swarm-net \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--endpoint-mode dnsrr \
|
||||
--publish 7500:7500 \
|
||||
--publish 7000:7000 \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
--mount type=bind,source=/data/frp/frps.ini,target=/frp/frps.ini \
|
||||
newnius/frp:v0.21.0
|
||||
```
|
||||
|
||||
## Start frpc
|
||||
|
||||
```bash
|
||||
docker service create \
|
||||
--name frpc \
|
||||
--hostname frpc \
|
||||
--network swarm-net \
|
||||
--replicas 1 \
|
||||
--detach=true \
|
||||
--endpoint-mode dnsrr \
|
||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
|
||||
--mount type=bind,source=/data/frp/frpc.ini,target=/frp/frpc.ini \
|
||||
newnius/frp:v0.21.0
|
||||
```
|
Loading…
Reference in New Issue
Block a user