From e1e18ba9d6974b71d4b5af2cdde2e9e283543088 Mon Sep 17 00:00:00 2001 From: fatedier Date: Tue, 16 Aug 2016 15:06:48 +0800 Subject: [PATCH] dockerfile: update --- Dockerfile | 20 +++++++++++++------- conf/frpc.ini | 3 --- conf/frpc_min.ini | 10 ++++++++++ conf/frps_min.ini | 14 ++++++++++++++ 4 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 conf/frpc_min.ini create mode 100644 conf/frps_min.ini diff --git a/Dockerfile b/Dockerfile index 30b3076a..934e9913 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,17 @@ FROM golang:1.6 -RUN go get github.com/tools/godep COPY . /go/src/github.com/fatedier/frp -RUN cd /go/src/github.com/fatedier/frp \ - && make \ - && mv bin/frpc bin/frps /usr/local/bin \ - && mv conf/*.ini / + +RUN cd /go/src/github.com/fatedier/frp \ + && make \ + && mv bin/frpc /frpc \ + && mv bin/frps /frps \ + && mv conf/frpc_min.ini /frpc.ini \ + && mv conf/frps_min.ini /frps.ini \ + && make clean + WORKDIR / -ENTRYPOINT ["frps"] -EXPOSE 6000 7000 7500 + +EXPOSE 80 443 6000 7000 7500 + +ENTRYPOINT ["/frps"] diff --git a/conf/frpc.ini b/conf/frpc.ini index 98517708..e5dc863d 100644 --- a/conf/frpc.ini +++ b/conf/frpc.ini @@ -1,7 +1,4 @@ -# [common] is integral section [common] -# A literal address or host name for IPv6 must be enclosed -# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80" server_addr = 0.0.0.0 server_port = 7000 # if you want to connect frps by http proxy, you can set http_proxy here or in global environment variables diff --git a/conf/frpc_min.ini b/conf/frpc_min.ini new file mode 100644 index 00000000..a49901d9 --- /dev/null +++ b/conf/frpc_min.ini @@ -0,0 +1,10 @@ +[common] +server_addr = 0.0.0.0 +server_port = 7000 +auth_token = 123 +privilege_token = 12345678 + +[ssh] +type = tcp +local_ip = 127.0.0.1 +local_port = 22 diff --git a/conf/frps_min.ini b/conf/frps_min.ini new file mode 100644 index 00000000..a0df74ad --- /dev/null +++ b/conf/frps_min.ini @@ -0,0 +1,14 @@ +[common] +bind_addr = 0.0.0.0 +bind_port = 7000 +vhost_http_port = 80 +vhost_https_port = 443 +dashboard_port = 7500 +privilege_mode = true +privilege_token = 12345678 + +[ssh] +type = tcp +auth_token = 123 +bind_addr = 0.0.0.0 +listen_port = 6000