From 8079905530b5d2bf8c548120a8d9554c6cc00c31 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Fri, 7 Oct 2022 20:27:53 +0500 Subject: [PATCH] FIX: Extract nextcloud archive --- .gitignore | 2 ++ Dockerfile | 17 +++++++---------- buildfiles/auto_config.sh | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 20052a6..b96fc12 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ configs/ configs/* logs/ logs/* +nextcloud/ +nextcloud/* diff --git a/Dockerfile b/Dockerfile index 2ae0d5c..9ae494d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,10 @@ FROM debian:11-slim WORKDIR /root -ARG NEXTCLOUD_VESION=1 ARG PHPVERSION=8.1 #Initial update packges -RUN apt update && apt upgrade +RUN apt update && apt upgrade -y # Language setup ENV LANG en_US.UTF-8 @@ -18,10 +17,15 @@ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ && locale-gen # Installing basic tools -RUN apt install zip unzip git gnupg2 ca-certificates lsb-release apt-transport-https wget curl nano vim -y --no-install-recommends \ +RUN apt install bzip2 zip unzip git gnupg2 ca-certificates lsb-release apt-transport-https wget curl nano vim -y --no-install-recommends \ && apt auto-remove -y \ && apt clean -y +#Download and extract Nextcloud.... +RUN wget https://download.nextcloud.com/server/releases/latest.tar.bz2 \ + && tar -xvf latest.tar.bz2 \ + && rm -v latest.tar.bz2 + # Installing and configuring nginx RUN apt install nginx -y --no-install-recommends \ && apt auto-remove -y \ @@ -63,14 +67,7 @@ RUN bash -c 'apt install -y php${PHPVERSION}-imagick imagemagick ffmpeg libreoff #Installing Optional cli enhancement PHP Modules #RUN bash -c 'apt install -y php${PHPVERSION}-pcntl --no-install-recommends' -#Download and extract Nextcloud.... -RUN wget https://download.nextcloud.com/server/releases/latest.tar.bz2 \ - && tar -xvf latest.tar.bz2 \ - && rm -v latest.tar.bz2 - - # Delete default stuff -#nginx RUN rm -rv /var/www/html/index.nginx-debian.html \ /etc/php/ \ /etc/nginx/ diff --git a/buildfiles/auto_config.sh b/buildfiles/auto_config.sh index 65d1b40..e82f131 100644 --- a/buildfiles/auto_config.sh +++ b/buildfiles/auto_config.sh @@ -9,7 +9,7 @@ cp -rv default_configs/etc/php /etc/ touch init/init #Copy nextcloud to web root -cp -rv nextcloud/ /var/www/html +cp -rv nextcloud/* /var/www/html/ #Create log dirs mkdir -pv /root/logs/nginx