diff --git a/docker/Dockerfile b/docker/Dockerfile index 6fd609e..1d3bb33 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,19 +34,6 @@ RUN curl -Lo ZeroTierOne.tar.gz https://codeload.github.com/zerotier/ZeroTierOne chmod 755 /usr/local/bin/zerotier-one -## Fetch plugin -FROM docker.io/golang:alpine AS fetch-plugin - -RUN mkdir -p /opt/zoraxy/zoraxy_plugin/ - -RUN apk add --update --no-cache git - -WORKDIR /opt/zoraxy/ - -RUN git clone https://github.com/aroz-online/zoraxy-official-plugins &&\ - cp -r ./zoraxy-official-plugins/src/ztnc/mod/zoraxy_plugin/ /opt/zoraxy/zoraxy_plugin/ - - ## Main FROM docker.io/golang:alpine @@ -55,7 +42,7 @@ FROM docker.io/golang:alpine COPY --chmod=700 ./entrypoint.sh /opt/zoraxy/ COPY --chmod=700 ./build_plugins.sh /usr/local/bin/build_plugins -COPY --from=fetch-plugin --chmod=700 /opt/zoraxy/zoraxy_plugin/ /opt/zoraxy/zoraxy_plugin/ +COPY --chmod=700 ./entrypoint.py /opt/zoraxy/ COPY --from=build-zerotier /usr/local/bin/zerotier-one /usr/local/bin/zerotier-one COPY --from=build-zoraxy /usr/local/bin/zoraxy /usr/local/bin/zoraxy diff --git a/docker/README.md b/docker/README.md index 2686fff..a360796 100644 --- a/docker/README.md +++ b/docker/README.md @@ -119,18 +119,14 @@ Or for Docker Compose: ### Plugins -You can find official plugins at https://github.com/aroz-online/zoraxy-official-plugins - -Place your plugins inside the volume `/path/to/zoraxy/plugin/:/opt/zoraxy/plugin/` (Adjust to your actual install location). Any plugins you have added will then be built and used on the next restart. - -> [!IMPORTANT] -> Plugins are currently experimental. +Zoraxy includes a (experimental) store to download and use official plugins right from inside Zoraxy, no preparation required. +For those looking to use custom plugins, build your plugins and place them inside the volume `/path/to/zoraxy/plugin/:/opt/zoraxy/plugin/` (Adjust to your actual install location). ### Building To build the Docker image: - Check out the repository/branch. - - Copy the Zoraxy `src/` and `example/` directory into the `docker/` (here) directory. + - Copy the Zoraxy `src/` directory into the `docker/` (here) directory. - Run the build command with `docker build -t zoraxy_build .` - You can now use the image `zoraxy_build` - If you wish to change the image name, then modify`zoraxy_build` in the previous step and then build again. diff --git a/docker/build_plugins.sh b/docker/build_plugins.sh deleted file mode 100644 index 91a7b26..0000000 --- a/docker/build_plugins.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -echo "Copying zoraxy_plugin to all mods..." -for dir in "$1"/*; do - if [ -d "$dir" ]; then - cp -r "/opt/zoraxy/zoraxy_plugin/" "$dir/mod/" - fi -done - -echo "Running go mod tidy and go build for all directories..." -for dir in "$1"/*; do - if [ -d "$dir" ]; then - cd "$dir" || exit 1 - go mod tidy - go build - cd "$1" || exit 1 - fi -done - diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 5bb7857..cf36899 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -13,11 +13,6 @@ trap cleanup SIGTERM SIGINT TERM INT update-ca-certificates && echo "CA certificates updated." zoraxy -update_geoip=true && echo "GeoIP data updated ." -echo "Building plugins..." -cd /opt/zoraxy/plugin/ || exit 1 -build_plugins "$PWD" -echo "Plugins built." -cd /opt/zoraxy/config/ || exit 1 if [ "$ZEROTIER" = "true" ]; then if [ ! -d "/opt/zoraxy/config/zerotier/" ]; then