commit 1890fc01042df947b0ea30f2f754f159cbad6af2 Author: Djkáťo Date: Tue May 21 23:05:26 2024 +0200 init 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