diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1862624 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,18 @@ +kind: pipeline +type: docker +name: default + +trigger: + branch: + - master + +steps: + - name: build + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: quackerd/frp + tags: latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a17390e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# +# Dockerfile for frp +# Based on: vimagick/frp +# + +FROM alpine + +ENV FRP_VERSION 0.31.2 +ENV FRP_URL https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz + +WORKDIR /opt/frp + +RUN set -xe \ + && apk add --no-cache curl tar \ + && curl -sSL $FRP_URL | tar xz --strip 1 \ + && apk del curl tar + +COPY ./run.sh /opt/run.sh +RUN chmod +x /opt/run.sh + +CMD ["/opt/run.sh"] + diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..533dee0 --- /dev/null +++ b/run.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -z $SERVER ] ; then + frpc -c frpc.ini +else + frps -c frps.ini +fi +