From 215ea7420cf9ed2b13f496613e0da98bbd4dc4f9 Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 25 May 2022 23:54:00 +0530 Subject: [PATCH 1/2] Added ldap write support and sed --- Dockerfile | 12 +++++++++++- custom_entrypoint.sh | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e946397..9d251aeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,9 @@ ARG RAINLOOP_COMMIT_SHA="523518ba" ARG EA_TAG="2.0.0-beta.1" ARG ECLOUD_LAUNCHER_JOB_ID="294845" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" +ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0" -RUN sed -i 's/22,2,7,1/22,2,7,11/' ${BASE_DIR}/version.php +RUN sed -i 's/22,2,7,1/22,2,7,12/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -93,6 +94,12 @@ RUN curl -fsSL -o ecloud-accounts.tar.gz \ mv "${BASE_DIR}/custom_apps/ecloud-drop-account-${EA_TAG}" "${BASE_DIR}/custom_apps/ecloud-accounts" && \ rm ecloud-accounts.tar.gz; +RUN curl -fsSL -o ldap_write_support.tar.gz \ + "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support.tar.gz" && \ + tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ + mv "${BASE_DIR}/custom_apps/ldap_write_support" "${BASE_DIR}/custom_apps/ldap_write_support" && \ + rm ldap_write_support.tar.gz + # Remove unzip when unzipping is done RUN apt-get -y remove unzip @@ -134,6 +141,9 @@ RUN sed -i 's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this-> RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js RUN sed -i 's/Nextcloud administrator/administrator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js +# Remove changeAvatar in changeUserHook of ldap_write_support as it throws errors +RUN sed -i 's/$this->changeAvatar/\/\/ $this->changeAvatar/' ${BASE_DIR}/custom_apps/ldap_write_support/lib/LDAPUserManager.php + # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index e3fd26ce..6949d541 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -30,6 +30,7 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/ecloud-theme-helper/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/integration_google/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ + rsync $rsync_options --include "/ldap_write_support/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ else -- GitLab From d6b106875b02a727301350b21a6e712b5b86b780 Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 25 May 2022 23:59:45 +0530 Subject: [PATCH 2/2] Fix command --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9d251aeb..3d9cf0db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,6 @@ RUN curl -fsSL -o ecloud-accounts.tar.gz \ RUN curl -fsSL -o ldap_write_support.tar.gz \ "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support.tar.gz" && \ tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ - mv "${BASE_DIR}/custom_apps/ldap_write_support" "${BASE_DIR}/custom_apps/ldap_write_support" && \ rm ldap_write_support.tar.gz # Remove unzip when unzipping is done -- GitLab