From 675e748316db52e736e046a0884db4d451cf5f14 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Wed, 2 Sep 2020 14:28:49 +0200 Subject: [PATCH] =?UTF-8?q?Added=20the=20ability=20to=20customize=20portai?= =?UTF-8?q?ner,=20especially=20the=20frontend=20app=20=F0=9F=92=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++++++- portainer/Dockerfile | 5 +++-- portainer/{ => root_builder}/client_build_prod.patch | 0 portainer/root_builder/custom/.gitignore | 4 ++++ portainer/{ => root_builder}/remove_telemetry.patch | 0 5 files changed, 16 insertions(+), 3 deletions(-) rename portainer/{ => root_builder}/client_build_prod.patch (100%) create mode 100644 portainer/root_builder/custom/.gitignore rename portainer/{ => root_builder}/remove_telemetry.patch (100%) 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