diff --git a/README.md b/README.md index f42cb4e..055182a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,15 @@ Unofficial build of Portainer 100% telemetry-free! -## Run +## Customize + +Simply place your custom files in [this](portainer/root_builder/custom) folder following the direcotry tree of the [Official Portainer's repo](https://github.com/portainer/portainer). + +Your files will replace the original ones after the frontend app is patched, but before it is built. + ++ **Custom Dir**: `portainer/root_builder/custom` + +## Build and Run Build the patched images and run: diff --git a/portainer/Dockerfile b/portainer/Dockerfile index 67febc6..b50ba61 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -4,7 +4,7 @@ ARG GOOS ARG GOARCH ARG GIT_TAG -COPY remove_telemetry.patch / +COPY root_builder/remove_telemetry.patch / RUN apk --update add git patch && \ git clone --depth 1 --branch $GIT_TAG https://github.com/portainer/portainer.git && \ @@ -16,13 +16,14 @@ FROM node:latest AS builder-client ARG GIT_TAG -COPY *.patch / +COPY root_builder / RUN apt-get update && apt-get install git && \ git clone --depth 1 --branch $GIT_TAG https://github.com/portainer/portainer.git && \ cd portainer && \ patch -p0 < /client_build_prod.patch && \ git apply /remove_telemetry.patch && \ + cp -R /custom/* . && \ yarn && \ yarn build:client diff --git a/portainer/client_build_prod.patch b/portainer/root_builder/client_build_prod.patch similarity index 100% rename from portainer/client_build_prod.patch rename to portainer/root_builder/client_build_prod.patch diff --git a/portainer/root_builder/custom/.gitignore b/portainer/root_builder/custom/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/portainer/root_builder/custom/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/portainer/remove_telemetry.patch b/portainer/root_builder/remove_telemetry.patch similarity index 100% rename from portainer/remove_telemetry.patch rename to portainer/root_builder/remove_telemetry.patch