From 1890fc01042df947b0ea30f2f754f159cbad6af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djk=C3=A1=C5=A5o?= Date: Tue, 21 May 2024 23:05:26 +0200 Subject: [PATCH] init --- .gitignore | 2 ++ Dockerfile | 11 +++++++++++ build.sh | 10 ++++++++++ docker-compose.yml | 8 ++++++++ examgle-config/frps.toml | 1 + 5 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100755 build.sh create mode 100644 docker-compose.yml create mode 100644 examgle-config/frps.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96225ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*frp_* +frps diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ed9b04e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM scratch + +WORKDIR /frps +COPY frps . +CMD ["./frps", "-c", "../config/frps.toml"] +LABEL src="frp-dockerize"\ + org.opencontainers.image.title="frp"\ + org.opencontainers.image.description="A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. " \ + org.opencontainers.image.url="https://github.com/fatedier/frp"\ + org.opencontainers.image.source="https://github.com/djkato/frp-dockerize"\ + org.opencontainers.image.authors="fatedier" diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..9a62fbf --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +VERSION=0.58.0 +CONTAINER_PUSH_URL="ghcr.io/djkato" +PLATFORM=linux_amd64 + +wget https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_${PLATFORM}.tar.gz +tar -xzf frp_${VERSION}_${PLATFORM}.tar.gz +mv ./frp_${VERSION}_${PLATFORM}/frps . + +## AND BUILD IT! +docker build . -t ${CONTAINER_PUSH_URL}/frp:${VERSION} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..621f0c5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + frps: + build: + dockerfile: Dockerfile + ports: + - 7000:7000 # 7000 port from example frps.toml + volumes: + - ./examgle-config:/config diff --git a/examgle-config/frps.toml b/examgle-config/frps.toml new file mode 100644 index 0000000..28e6d96 --- /dev/null +++ b/examgle-config/frps.toml @@ -0,0 +1 @@ +bindPort = 7000