From 855edb3f2abf90710db8c9023c0d2d6688097b88 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Wed, 2 Aug 2023 22:29:07 -0500 Subject: [PATCH 01/57] Update Dockerfile Work on building from scratch instead of from deb --- server/Dockerfile | 214 +++++++++++++--------------------------------- 1 file changed, 58 insertions(+), 156 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 9a49b5bc..0627ea67 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,16 +1,8 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -#RUN echo $DB_HOST -#ARG DB_HOST=$BLUECHERRY_DB_HOST -#RUN echo $BLUECHERRY_DB_HOST -ARG BLUECHERRY_GIT_BRANCH_TAG=v3.1.0-latest -#ARG MYSQLHOST -#ENV MYSQL_HOST=MYSQLHOST +ARG BLUECHERRY_GIT_BRANCH_TAG=v3.1.0-rc8 -#RUN echo "Testing github network env" -#RUN echo ${{ steps.github-network.outputs.gateway-address }} -RUN echo $MYSQL_HOST # --------------------------------------------------------------------------- # Build the base OS with some development libs and tools @@ -18,78 +10,55 @@ FROM baseos AS os_dev_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -CMD ["echo", "Testing mysql connection via nmap..."] - RUN apt-get update -RUN apt-get -y install nmap -#RUN nmap mysql -p 3306 - -CMD ["echo", "Installing other stuff..."] - -#RUN apt-get install --no-install-recommends -y \ -# git sudo openssl ca-certificates wget gnupg gnupg2 gnupg1 \ -# ssl-cert nmap curl sysstat iproute2 \ -# autoconf automake libtool build-essential gcc g++ \ -# debhelper ccache bison flex texinfo yasm cmake -#RUN apt-get install --no-install-recommends -y \ -# libbsd-dev libopencv-dev libudev-dev libva-dev \ -# linux-image-generic linux-headers-generic \ -# libmysqlclient-dev rsyslog - -CMD ["echo", "Testing mysql connection..."] - -RUN apt install -y mysql-client -#RUN ip a -RUN mysql -uroot -proot -h 172.17.0.1 -e 'SELECT version()' +RUN apt-get install --no-install-recommends -y \ + git sudo openssl ca-certificates wget gnupg gnupg2 gnupg1 \ + ssl-cert nmap curl sysstat iproute2 \ + autoconf automake libtool build-essential gcc g++ \ + debhelper ccache bison flex texinfo yasm cmake +RUN apt-get install --no-install-recommends -y \ + libbsd-dev libopencv-dev libudev-dev libva-dev \ + linux-image-generic linux-headers-generic \ + libmysqlclient-dev rsyslog + # --------------------------------------------------------------------------- -#FROM os_dev_environment as bluecherry_base_environment +FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -#RUN git clone --progress --depth 1 \ -# http://github.com/bluecherrydvr/bluecherry-apps.git \ -# && cd bluecherry-apps \ -# && git checkout $BLUECHERRY_GIT_BRANCH_TAG - -#RUN apt-get --no-install-recommends -y install \ -# libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ -# zlib1g ucf mkvtoolnix v4l-utils vainfo i965-va-driver +RUN git clone --progress --depth 1 \ + http://github.com/bluecherrydvr/bluecherry-apps.git \ + && cd bluecherry-apps \ + && git checkout $BLUECHERRY_GIT_BRANCH_TAG -CMD ["echo", "**************** NMAP output..."] -RUN apt-get update -RUN apt-get -y install nmap -RUN nmap 127.0.0.1 -p 3306 - -CMD ["echo", "Installing other stuff..."] - -RUN apt install -y --no-install-recommends wget sudo gnupg -#RUN wget -q https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 -O- | apt-key add - -RUN apt update +RUN apt-get --no-install-recommends -y install \ + libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ + zlib1g ucf mkvtoolnix v4l-utils vainfo i965-va-driver -#RUN apt-get --no-install-recommends -y install \ -# php-mail php-mail-mime php-net-smtp php-gd php-curl \ -# php-mysql php-sqlite3 \ -# mysql-client sqlite3 +RUN apt-get --no-install-recommends -y install \ + php-mail php-mail-mime php-net-smtp php-gd php-curl \ + php-mysql php-sqlite3 \ + apache2 libapache2-mod-php mysql-client sqlite3 # --------------------------------------------------------------------------- # Build the bluecherry app and dependencies. This is done in a separate # image because there are many ways it can fail and then we save time # by being able to reuse prior containers leading up to this build. -#FROM bluecherry_base_environment as bluecherry_build -#ENV DEBIAN_FRONTEND=noninteractive -#WORKDIR /root +FROM bluecherry_base_environment as bluecherry_build +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /root -#COPY depends/onvif_tool bluecherry-apps/utils/onvif_tool +COPY depends/onvif_tool bluecherry-apps/utils/onvif_tool -#RUN cd bluecherry-apps \ -# && ./scripts/build_pkg_native.sh +RUN cd bluecherry-apps \ + && ./scripts/build_pkg_native.sh # --------------------------------------------------------------------------- -#FROM bluecherry_build as bluecherry_build_cleaned +FROM bluecherry_build as bluecherry_build_cleaned ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -104,26 +73,13 @@ RUN rm -rf .ccache \ # --------------------------------------------------------------------------- # Install the bluecherry app and dependencies -#FROM baseos as bluecherry_install +FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -#COPY --from=bluecherry_build_cleaned \ -# /root/bluecherry-apps/releases/bluecherry_*.deb \ -# /root/bluecherry-apps/releases/ -RUN apt update -#RUN apt install --no-install-recommends -y wget mariadb-client libopencv-core libopencv-imgcodecs libopencv-imgproc libva-drm2 libva2 mkvtoolnix php-mail php-mail-mime \# -# php-net-smtp sqlite3 nginx php-fpm php-mysql php-sqlite3 v4l-utils vainfo i965-va-driver php-gd php-curl mariadb-client python3-pip python3-distutils gnupg2 -RUN apt install --no-install-recommends -y libbsd0 libc6 libgcc-s1 libmariadb3 libopencv-core4.2 libopencv-imgcodecs4.2 libopencv-imgproc4.2 curl \ - libssl1.1 libstdc++6 libudev1 libva-drm2 libva2 zlib1g ssl-cert ucf curl sysstat mkvtoolnix php-mail \ - php-mail-mime php-net-smtp sqlite3 nmap nginx php-fpm php-mysql php-sqlite3 v4l-utils vainfo i965-va-driver mysql-client python3-pip - - - -#RUN wget https://unstable.bluecherrydvr.com/pool/focal/bluecherry_3.1.0-rc8_amd64.deb -RUN curl -k -o /tmp/bluecherry_3.1.0-rc8_amd64.deb https://unstable.bluecherrydvr.com/pool/focal/bluecherry_3.1.0-rc8_amd64.deb - -#COPY depends/bluecherry_3.1.0-rc8_amd64.deb /tmp/bluecherry_3.1.0-rc8_amd64.deb +COPY --from=bluecherry_build_cleaned \ + /root/bluecherry-apps/releases/bluecherry_*.deb \ + /root/bluecherry-apps/releases/ # This step is needed if/when building a new bluecherry docker container # that will connect to an existing bluecherry database. In this case, the @@ -131,7 +87,7 @@ RUN curl -k -o /tmp/bluecherry_3.1.0-rc8_amd64.deb https://unstable.bluecherrydv # /etc/bluecherry.conf file to tell it that it is okay to connect to (and # modify) that database # -#COPY bluecherry.conf /etc/bluecherry.conf +COPY bluecherry.conf /etc/bluecherry.conf ARG MYSQL_ADMIN_LOGIN=root ARG MYSQL_ADMIN_PASSWORD=root @@ -139,9 +95,9 @@ ARG MYSQL_ADMIN_PASSWORD=root # Specific database credentials used by bluecherry server ARG BLUECHERRY_DB_USER=bluecherry ARG BLUECHERRY_DB_HOST=172.17.0.1 -ARG BLUECHERRY_DB_PASSWORD=qiNdklOierSZs2 +ARG BLUECHERRY_DB_PASSWORD=bluecherry ARG BLUECHERRY_DB_NAME=bluecherry -ARG BLUECHERRY_DB_ACCESS_HOST='%' +ARG BLUECHERRY_DB_ACCESS_HOST=% # User and Group info used for running bluecherry server processes ARG BLUECHERRY_LINUX_GROUP_NAME=bluecherry @@ -151,25 +107,23 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ - wget sudo rsyslog nmap curl sysstat iproute2 \ + rsyslog nmap curl sysstat iproute2 \ openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 -#COPY my.cnf /root/.my.cnf - -#RUN { \ -# echo "[client]"; \ -# echo "user=$MYSQL_ADMIN_LOGIN"; \ -# echo "password=$MYSQL_ADMIN_PASSWORD"; \ -# echo "[mysql]"; \ -# echo "user=$MYSQL_ADMIN_LOGIN"; \ -# echo "password=$MYSQL_ADMIN_PASSWORD"; \ -# echo "[mysqldump]"; \ -# echo "user=$MYSQL_ADMIN_LOGIN"; \ -# echo "password=$MYSQL_ADMIN_PASSWORD"; \ -# echo "[mysqldiff]"; \ -# echo "user=$MYSQL_ADMIN_LOGIN"; \ -# echo "password=$MYSQL_ADMIN_PASSWORD"; \ -# } > /root/.my.cnf +RUN { \ + echo "[client]"; \ + echo "user=$MYSQL_ADMIN_LOGIN"; \ + echo "password=$MYSQL_ADMIN_PASSWORD"; \ + echo "[mysql]"; \ + echo "user=$MYSQL_ADMIN_LOGIN"; \ + echo "password=$MYSQL_ADMIN_PASSWORD"; \ + echo "[mysqldump]"; \ + echo "user=$MYSQL_ADMIN_LOGIN"; \ + echo "password=$MYSQL_ADMIN_PASSWORD"; \ + echo "[mysqldiff]"; \ + echo "user=$MYSQL_ADMIN_LOGIN"; \ + echo "password=$MYSQL_ADMIN_PASSWORD"; \ + } > /root/.my.cnf # NOTE: The line "export host=$BLUECHERRY_DB_HOST" ... This is required # due to a weird global check of this env var by the "check_mysql_admin" @@ -178,22 +132,6 @@ RUN apt-get update \ # --- The Specific problem line is: # if ! echo "show databases" | mysql_wrapper -h"${host}" -u"$MYSQL_ADMIN_LOGIN" &>/dev/null # -#RUN { \ -# echo bluecherry bluecherry/mysql_admin_login string $MYSQL_ADMIN_LOGIN; \ -# echo bluecherry bluecherry/mysql_admin_password password $MYSQL_ADMIN_PASSWORD; \ -# echo bluecherry bluecherry/db_host string $BLUECHERRY_DB_HOST; \ -## echo bluecherry bluecherry/db_host string mysql \ -# echo bluecherry bluecherry/db_userhost string $BLUECHERRY_DB_ACCESS_HOST; \ -# echo bluecherry bluecherry/db_name string $BLUECHERRY_DB_NAME; \ -# echo bluecherry bluecherry/db_user string $BLUECHERRY_DB_USER; \ -# echo bluecherry bluecherry/db_password password $BLUECHERRY_DB_PASSWORD; \ -# } | debconf-set-selections \ -# && export host=mysql \ -# && export host=$BLUECHERRY_DB_HOST \ -# && dpkg -i /tmp/bluecherry_3.1.0-rc8_amd64.deb - -RUN apt install -y php-curl php-gd - RUN { \ echo bluecherry bluecherry/mysql_admin_login string $MYSQL_ADMIN_LOGIN; \ echo bluecherry bluecherry/mysql_admin_password password $MYSQL_ADMIN_PASSWORD; \ @@ -203,23 +141,20 @@ RUN { \ echo bluecherry bluecherry/db_user string $BLUECHERRY_DB_USER; \ echo bluecherry bluecherry/db_password password $BLUECHERRY_DB_PASSWORD; \ } | debconf-set-selections \ -# && export DB_HOST="mysql" \ -# && export HOST=mysql \ -&& dpkg -i /tmp/bluecherry_3.1.0-rc8_amd64.deb - - + && export host=$BLUECHERRY_DB_HOST \ + && apt install -y ./bluecherry-apps/releases/bluecherry_*.deb # Cleanup tasks RUN apt-get clean \ -# && rm -f bluecherry-apps/releases/bluecherry_*.deb \ + && rm -f bluecherry-apps/releases/bluecherry_*.deb \ && rm -rf /var/lib/apt/lists/* # Remove these files -- we needed them to build the docker image, since the # bluecherry installer scripts interact with the database. However, once the # image is created, we expect it to receive all of the settings/credentials # from environment variables passed in by docker or docker-compose. -#RUN rm -f /root/.my.cnf \ -RUN rm -f /etc/bluecherry.conf +RUN rm -f /root/.my.cnf \ + && rm -f /etc/bluecherry.conf # When running rsyslog in a container, we need to disable imklog # since the in-container process won't be allowed access to it. @@ -232,7 +167,7 @@ RUN /usr/sbin/groupadd -rf \ --comment "Bluecherry DVR" \ --home-dir=/var/lib/bluecherry \ --gid=$BLUECHERRY_LINUX_GROUP_NAME \ - --groups=audio,video,render \ + --groups=audio,video \ --uid=$BLUECHERRY_LINUX_USER_ID \ $BLUECHERRY_LINUX_USER_NAME \ || echo "bluecherry user already exists" @@ -242,38 +177,6 @@ RUN mkdir /recordings \ EXPOSE 7001/tcp 7002/tcp -# This is the main script that runs as process ID 1 in the docker container -#COPY server/entrypoint.sh /entrypoint.sh - -# These scripts are wrappers used to manage the bluecherry database. They are -# necessary because the bluecherry installer usually sets up the database, but -# with a pre-built docker image the installer isn't run (so these actions have -# to be done manually as needed from the docker container... example usage -# from the docker host looks like: -# -# --- CREATE: sudo docker-compose run bluecherry bc-database-create -# --- UPGRADE: sudo docker-compose run bluecherry bc-database-upgrade -#COPY server/bc-database-create.sh /bin/bc-database-create -#COPY server/bc-database-upgrade.sh /bin/bc-database-upgrade - -# This copies in a modified rsyslog config, which tells rsyslog to route -# bluecherry logs to both /var/log/bluecherry.log (within the container) and -# also to the STDOUT of container process with PID 1, which then allows the -# logs to be received by the docker engine (and read via `docker logs` , etc.) -#COPY server/bc-rsyslog.conf /etc/rsyslog.d/10-bluecherry.conf - - - - -#ARG BLUECHERRY_GIT_BRANCH_TAG=v3.0.4 - -#FROM os_dev_environment as bluecherry_build_cleaned -ENV DEBIAN_FRONTEND=noninteractive -WORKDIR /root - -RUN rm -rf /usr/src/linux-headers-* - - # This is the main script that runs as process ID 1 in the docker container COPY entrypoint.sh /entrypoint.sh @@ -292,7 +195,6 @@ COPY bc-database-upgrade.sh /bin/bc-database-upgrade # bluecherry logs to both /var/log/bluecherry.log (within the container) and # also to the STDOUT of container process with PID 1, which then allows the # logs to be received by the docker engine (and read via `docker logs` , etc.) -RUN ls -ltrd /etc/rsyslog.d COPY bc-rsyslog.conf /etc/rsyslog.d/10-bluecherry.conf # Make the previously copied scripts executable From ac0704f40d154b1071e9a51b7a7e27e2f5e21e9b Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Wed, 2 Aug 2023 22:31:50 -0500 Subject: [PATCH 02/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 0627ea67..f57067e0 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -87,7 +87,7 @@ COPY --from=bluecherry_build_cleaned \ # /etc/bluecherry.conf file to tell it that it is okay to connect to (and # modify) that database # -COPY bluecherry.conf /etc/bluecherry.conf +#COPY bluecherry.conf /etc/bluecherry.conf ARG MYSQL_ADMIN_LOGIN=root ARG MYSQL_ADMIN_PASSWORD=root From 22b03d399c88ce01a42de70914ff9a76b2c59b20 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Wed, 2 Aug 2023 22:36:04 -0500 Subject: [PATCH 03/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index f57067e0..d25f4dbb 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -ARG BLUECHERRY_GIT_BRANCH_TAG=v3.1.0-rc8 +ARG BLUECHERRY_GIT_BRANCH_TAG=master # --------------------------------------------------------------------------- From 48ff88d360cd90a20b779c125a205f139fcf5710 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Wed, 2 Aug 2023 22:42:55 -0500 Subject: [PATCH 04/57] Update Dockerfile git clone --recurse-submodules --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index d25f4dbb..a12a83d0 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -29,7 +29,7 @@ FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -RUN git clone --progress --depth 1 \ +RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG From b5e1fbf56935351a0d9b7f4094847915638438c3 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 08:51:51 -0500 Subject: [PATCH 05/57] Update Dockerfile --no-install-recommends --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index a12a83d0..296cd2ab 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -108,7 +108,7 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ rsyslog nmap curl sysstat iproute2 \ - openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 + openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo RUN { \ echo "[client]"; \ @@ -142,7 +142,7 @@ RUN { \ echo bluecherry bluecherry/db_password password $BLUECHERRY_DB_PASSWORD; \ } | debconf-set-selections \ && export host=$BLUECHERRY_DB_HOST \ - && apt install -y ./bluecherry-apps/releases/bluecherry_*.deb + && apt install -y --no-install-recommends ./bluecherry-apps/releases/bluecherry_*.deb # Cleanup tasks RUN apt-get clean \ From 6223df594e6f22a583104910a123e49a88a88051 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 09:04:33 -0500 Subject: [PATCH 06/57] Update Dockerfile Install mysql-client --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 296cd2ab..6309f82a 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -108,7 +108,7 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ rsyslog nmap curl sysstat iproute2 \ - openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo + openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client RUN { \ echo "[client]"; \ From 871707fb5acf3c7a925c4cdda5ea95d8d3b7f8ef Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 09:18:58 -0500 Subject: [PATCH 07/57] Update Dockerfile Install python3-pip, wget and curl --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 6309f82a..ac16211b 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -108,7 +108,7 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ rsyslog nmap curl sysstat iproute2 \ - openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client + openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl RUN { \ echo "[client]"; \ From f306a320570946350e99387c167d46e888686d5d Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 19:50:09 -0500 Subject: [PATCH 08/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index ac16211b..ca847721 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -202,4 +202,5 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade +CMD rm -f /var/run/rsyslogd.pid && rsyslogd -n CMD "/entrypoint.sh" From 9f56368ea19be0f3ffc67bea3c155eaa877880e1 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 20:59:04 -0500 Subject: [PATCH 09/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index ca847721..45747a59 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -202,5 +202,5 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade -CMD rm -f /var/run/rsyslogd.pid && rsyslogd -n +CMD rm -f /var/run/rsyslogd.pid CMD "/entrypoint.sh" From 0e137a03d4991d64e8645a2e473ad273541584a8 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 3 Aug 2023 21:28:34 -0500 Subject: [PATCH 10/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index 45747a59..b2ffbda2 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -204,3 +204,4 @@ RUN chmod +x /entrypoint.sh \ CMD rm -f /var/run/rsyslogd.pid CMD "/entrypoint.sh" +CMD ["nginx", "-g", "daemon off;"] From e68738f1aa0d04961d8599eb8b8d147c316827d6 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Fri, 4 Aug 2023 22:25:35 -0500 Subject: [PATCH 11/57] Update Dockerfile Install nano, rearrange last CMDs --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index b2ffbda2..0d821bea 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -108,7 +108,7 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ rsyslog nmap curl sysstat iproute2 \ - openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl + openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl nano RUN { \ echo "[client]"; \ @@ -203,5 +203,5 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-upgrade CMD rm -f /var/run/rsyslogd.pid -CMD "/entrypoint.sh" CMD ["nginx", "-g", "daemon off;"] +CMD "/entrypoint.sh" From 97fb7247c8550f44dbbbe093aac4f42332e563b3 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Fri, 4 Aug 2023 22:40:54 -0500 Subject: [PATCH 12/57] Update Dockerfile --- server/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 0d821bea..4107ec72 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -203,5 +203,6 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-upgrade CMD rm -f /var/run/rsyslogd.pid -CMD ["nginx", "-g", "daemon off;"] +CMD service rsyslog start +CMD ["/usr/sbin/nginx", "-g", "daemon off;"] CMD "/entrypoint.sh" From b55a36e8fea867d1c52ffcffcc70ec4702e2122b Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Fri, 4 Aug 2023 22:56:07 -0500 Subject: [PATCH 13/57] Update Dockerfile --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 4107ec72..bb33224c 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -203,6 +203,6 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-upgrade CMD rm -f /var/run/rsyslogd.pid -CMD service rsyslog start -CMD ["/usr/sbin/nginx", "-g", "daemon off;"] +#CMD service rsyslog start CMD "/entrypoint.sh" +CMD ["/usr/sbin/nginx", "-g", "daemon off;"] From 9b8715199d0f914e301be86973106079fb9aa28f Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Fri, 4 Aug 2023 23:02:55 -0500 Subject: [PATCH 14/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index bb33224c..764b4a23 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -203,6 +203,7 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-upgrade CMD rm -f /var/run/rsyslogd.pid +CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start CMD "/entrypoint.sh" CMD ["/usr/sbin/nginx", "-g", "daemon off;"] From b025c9fcdcdcc14b4b338536b5aeedb75074184d Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 6 Aug 2023 21:20:30 -0500 Subject: [PATCH 15/57] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 147ec09a..def2722c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,6 +52,8 @@ jobs: run: docker ps - name: Check out the repo uses: actions/checkout@v3 + - name: Identify git repo path + run: ls $GITHUB_WORKSPACE && ls -l /home/runner/work/ - name: Wait for mysql run: sleep 15 - name: Set up Docker Buildx From 6760f923af9f680394419d66691f55a33b7e8f83 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 6 Aug 2023 21:28:07 -0500 Subject: [PATCH 16/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index 764b4a23..23ea28b6 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -33,6 +33,7 @@ RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG + && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc8"/#define PRODUCT_VERSION "3.1.0-rc8-docker"/' ‎server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From dcb63883b2f54a352f679a214f2e28d20a828862 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 6 Aug 2023 21:30:26 -0500 Subject: [PATCH 17/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 23ea28b6..3b7ea6a3 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -32,7 +32,7 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ - && git checkout $BLUECHERRY_GIT_BRANCH_TAG + && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc8"/#define PRODUCT_VERSION "3.1.0-rc8-docker"/' ‎server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ From b0fed18be0e9680e61e4db8c85060651153e4810 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 6 Aug 2023 21:42:31 -0500 Subject: [PATCH 18/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 3b7ea6a3..a5f140df 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -33,7 +33,7 @@ RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ - && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc8"/#define PRODUCT_VERSION "3.1.0-rc8-docker"/' ‎server/v3license_processor.h + && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc8"/#define PRODUCT_VERSION "3.1.0-rc8-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From 825a4dca02436aa13502fa1e44dcfc9e90aa0a75 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 26 Aug 2023 15:00:48 -0500 Subject: [PATCH 19/57] Update Dockerfile --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index a5f140df..7c68ce92 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -204,7 +204,7 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-upgrade CMD rm -f /var/run/rsyslogd.pid -CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] +#CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start CMD "/entrypoint.sh" -CMD ["/usr/sbin/nginx", "-g", "daemon off;"] +#CMD ["/usr/sbin/nginx", "-g", "daemon off;"] From 29cb8ec36f9249d6d722c22007d1b9cd1042c1da Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 26 Aug 2023 15:16:19 -0500 Subject: [PATCH 20/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 7c68ce92..a3f35d26 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -203,7 +203,7 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade -CMD rm -f /var/run/rsyslogd.pid +#CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start CMD "/entrypoint.sh" From 837a8b397d9f721435d7cb016335bee047c3416e Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 26 Aug 2023 21:04:38 -0500 Subject: [PATCH 21/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index a3f35d26..b5677d27 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -207,4 +207,4 @@ RUN chmod +x /entrypoint.sh \ #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start CMD "/entrypoint.sh" -#CMD ["/usr/sbin/nginx", "-g", "daemon off;"] +CMD ["/usr/sbin/nginx", "-g", "daemon off;"] From 2c7a73ec241943eb81b8426a18cfd6ce37ed21b4 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 26 Aug 2023 21:21:36 -0500 Subject: [PATCH 22/57] Update Dockerfile Start nginx before entrypoint --- server/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index b5677d27..4dae088f 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -206,5 +206,6 @@ RUN chmod +x /entrypoint.sh \ #CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start -CMD "/entrypoint.sh" CMD ["/usr/sbin/nginx", "-g", "daemon off;"] +CMD "/entrypoint.sh" + From 5fd6ed0165fa2a19e00ca2fced540885af49388e Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 26 Aug 2023 21:56:31 -0500 Subject: [PATCH 23/57] Update entrypoint.sh --- server/entrypoint.sh | 55 ++++++-------------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 4464b877..e714df0f 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -59,57 +59,16 @@ if [ $status -ne 0 ]; then exit $status fi -entrypoint_log() { - if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then - echo "$@" - fi -} - -if [ "$1" = "nginx" ] || [ "$1" = "nginx-debug" ]; then - if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then - entrypoint_log "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" - - entrypoint_log "$0: Looking for shell scripts in /docker-entrypoint.d/" - find "/docker-entrypoint.d/" -follow -type f -print | sort -V | while read -r f; do - case "$f" in - *.envsh) - if [ -x "$f" ]; then - entrypoint_log "$0: Sourcing $f"; - . "$f" - else - # warn on shell scripts without exec bit - entrypoint_log "$0: Ignoring $f, not executable"; - fi - ;; - *.sh) - if [ -x "$f" ]; then - entrypoint_log "$0: Launching $f"; - "$f" - else - # warn on shell scripts without exec bit - entrypoint_log "$0: Ignoring $f, not executable"; - fi - ;; - *) entrypoint_log "$0: Ignoring $f";; - esac - done - - entrypoint_log "$0: Configuration complete; ready for start up" - else - entrypoint_log "$0: No files found in /docker-entrypoint.d/, skipping configuration" - fi -fi - exec "$@" -#echo "> /usr/sbin/nginx" +echo "> /usr/sbin/nginx" #source /etc/apache2/envvars -#/usr/sbin/apache2 -#status=$? -#if [ $status -ne 0 ]; then -# echo "Failed to start apache2 web server: $status" -# exit $status -#fi +/usr/sbin/nginx +status=$? +if [ $status -ne 0 ]; then + echo "Failed to start nginx web server: $status" + exit $status +fi echo "> /usr/sbin/bc-server -u bluecherry -g bluecherry" From 0a5c0da09f92fb2a9b9b22736cccc60179ef2e9d Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 17:46:02 -0500 Subject: [PATCH 24/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 4dae088f..1197e603 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -ARG BLUECHERRY_GIT_BRANCH_TAG=master +ARG BLUECHERRY_GIT_BRANCH_TAG=rc9-testing # --------------------------------------------------------------------------- From 56c4d2f78b5c9ffd9547fc3918c25ca448c3591d Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 17:54:52 -0500 Subject: [PATCH 25/57] Update Dockerfile --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 1197e603..2c8295f5 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -ARG BLUECHERRY_GIT_BRANCH_TAG=rc9-testing +ARG BLUECHERRY_GIT_BRANCH_TAG="rc9-testing" # --------------------------------------------------------------------------- @@ -33,7 +33,7 @@ RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ - && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc8"/#define PRODUCT_VERSION "3.1.0-rc8-docker"/' server/v3license_processor.h + && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From 81f896cd4c2b686364891ca86fc360212d330990 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 18:02:53 -0500 Subject: [PATCH 26/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 2c8295f5..7b369f40 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -ARG BLUECHERRY_GIT_BRANCH_TAG="rc9-testing" +ARG BLUECHERRY_GIT_BRANCH_TAG=rc9-testing # --------------------------------------------------------------------------- From 6ee0c58e521bf4b22c6f91cb3a6c21a3ddfe73f4 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 18:30:31 -0500 Subject: [PATCH 27/57] Update Dockerfile --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 7b369f40..406f44eb 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -32,8 +32,8 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ - && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ - && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h + && git checkout $BLUECHERRY_GIT_BRANCH_TAG +RUN pwd && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From f5e41cf7c03cc81aa304da6c8a0027f5d411d8e8 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 18:40:13 -0500 Subject: [PATCH 28/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 406f44eb..2c69496f 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -32,7 +32,7 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ - && git checkout $BLUECHERRY_GIT_BRANCH_TAG + && git checkout rc9-testing RUN pwd && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ From 6eef55990bb9d72194b8ddf092742fc8909ade8a Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 19:26:56 -0500 Subject: [PATCH 29/57] Update Dockerfile --- server/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 2c69496f..9e58e3ce 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -30,10 +30,11 @@ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ - http://github.com/bluecherrydvr/bluecherry-apps.git \ - && cd bluecherry-apps \ - && git checkout rc9-testing -RUN pwd && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h + http://github.com/bluecherrydvr/bluecherry-apps.git +RUN cd bluecherry-apps +RUN git checkout rc9-testing +RUN pwd +RUN sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From dbc73a486fa9789d9c9f18df687031f6b6aaeaca Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 19:35:46 -0500 Subject: [PATCH 30/57] Update Dockerfile --- server/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 9e58e3ce..d7ac5264 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -32,9 +32,8 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git RUN cd bluecherry-apps -RUN git checkout rc9-testing -RUN pwd -RUN sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h +RUN pwd +RUN pwd && cd bluecherry-apps && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From 5af5b347b91383f3c3dbf1b32a44a10da6f5de3c Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 19:50:23 -0500 Subject: [PATCH 31/57] Update Dockerfile --- server/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index d7ac5264..dfda61b0 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -31,9 +31,7 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git -RUN cd bluecherry-apps -RUN pwd -RUN pwd && cd bluecherry-apps && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h +RUN cd bluecherry-apps && pwd && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From dd65c6286dcc8e29cd8efcdf53b4925ef5512313 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 20:49:49 -0500 Subject: [PATCH 32/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index dfda61b0..59306967 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -31,7 +31,7 @@ WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ http://github.com/bluecherrydvr/bluecherry-apps.git -RUN cd bluecherry-apps && pwd && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h +RUN cd bluecherry-apps && pwd && git fetch --all && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ From c579b365d37b4fdf4eb9f0f3c122891c5b4c4964 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 27 Aug 2023 20:59:52 -0500 Subject: [PATCH 33/57] Update Dockerfile --- server/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 59306967..5c96762e 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # set a base image with environment to build from FROM ubuntu:20.04 AS baseos -ARG BLUECHERRY_GIT_BRANCH_TAG=rc9-testing +ARG BLUECHERRY_GIT_BRANCH_TAG=master # --------------------------------------------------------------------------- @@ -30,9 +30,12 @@ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root RUN git clone --recurse-submodules --progress --depth 1 \ - http://github.com/bluecherrydvr/bluecherry-apps.git -RUN cd bluecherry-apps && pwd && git fetch --all && git checkout rc9-testing && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h + http://github.com/bluecherrydvr/bluecherry-apps.git \ + && cd bluecherry-apps \ + && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ + && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h + RUN apt-get --no-install-recommends -y install \ libbsd0 libc6 libgcc1 libssl1.1 libstdc++6 libudev1 \ zlib1g ucf mkvtoolnix v4l-utils vainfo i965-va-driver From 74c7dfe8dde5a8dac8aa50be1a8c410ef1ba1db1 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 16 Sep 2023 20:05:26 -0500 Subject: [PATCH 34/57] Update Dockerfile Bump for RC9 --- server/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 5c96762e..79e5e48b 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -3,7 +3,6 @@ FROM ubuntu:20.04 AS baseos ARG BLUECHERRY_GIT_BRANCH_TAG=master - # --------------------------------------------------------------------------- # Build the base OS with some development libs and tools FROM baseos AS os_dev_environment From 8e3980b4e827251f6f0149a3c2150ebca05251b2 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 16 Sep 2023 20:26:35 -0500 Subject: [PATCH 35/57] Update Dockerfile - RC9 --- server/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 79e5e48b..d3384cde 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -28,8 +28,9 @@ FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -RUN git clone --recurse-submodules --progress --depth 1 \ - http://github.com/bluecherrydvr/bluecherry-apps.git \ +# RUN git clone --recurse-submodules --progress --depth 1 \ + RUN git clone --recurse-submodules --progress \ +# http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h @@ -82,6 +83,8 @@ COPY --from=bluecherry_build_cleaned \ /root/bluecherry-apps/releases/bluecherry_*.deb \ /root/bluecherry-apps/releases/ +RUN ls -l /root/bluecherry-apps/releases/ + # This step is needed if/when building a new bluecherry docker container # that will connect to an existing bluecherry database. In this case, the # bluecherry installer will see the existing database, and it needs the From 202db63fb2d7d9b0ee232e89c6235c1f8ebc254f Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 16 Sep 2023 20:39:38 -0500 Subject: [PATCH 36/57] Update Dockerfile --- server/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index d3384cde..b2fc11b2 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -29,8 +29,7 @@ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root # RUN git clone --recurse-submodules --progress --depth 1 \ - RUN git clone --recurse-submodules --progress \ -# http://github.com/bluecherrydvr/bluecherry-apps.git \ + RUN git clone --recurse-submodules --progress http://github.com/bluecherrydvr/bluecherry-apps.git \ && cd bluecherry-apps \ && git checkout $BLUECHERRY_GIT_BRANCH_TAG \ && sed -i 's/#define PRODUCT_VERSION "3.1.0-rc9"/#define PRODUCT_VERSION "3.1.0-rc9-docker"/' server/v3license_processor.h From eea49d5911cea898395d5f24fd6e296f61051ef7 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 20:38:53 -0500 Subject: [PATCH 37/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index b2fc11b2..77ef351f 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -74,7 +74,7 @@ RUN rm -rf .ccache \ # --------------------------------------------------------------------------- # Install the bluecherry app and dependencies -FROM baseos as bluecherry_install +#FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root From e22876cecc76cdf9ca42d37808274a7af19df9bf Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 20:52:00 -0500 Subject: [PATCH 38/57] Update Dockerfile --- server/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 77ef351f..3d03bfcc 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -5,7 +5,7 @@ ARG BLUECHERRY_GIT_BRANCH_TAG=master # --------------------------------------------------------------------------- # Build the base OS with some development libs and tools -FROM baseos AS os_dev_environment +#FROM baseos AS os_dev_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -24,7 +24,7 @@ RUN apt-get install --no-install-recommends -y \ # --------------------------------------------------------------------------- -FROM os_dev_environment as bluecherry_base_environment +#FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -48,7 +48,7 @@ RUN apt-get --no-install-recommends -y install \ # Build the bluecherry app and dependencies. This is done in a separate # image because there are many ways it can fail and then we save time # by being able to reuse prior containers leading up to this build. -FROM bluecherry_base_environment as bluecherry_build +#FROM bluecherry_base_environment as bluecherry_build ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -59,7 +59,7 @@ RUN cd bluecherry-apps \ # --------------------------------------------------------------------------- -FROM bluecherry_build as bluecherry_build_cleaned +#FROM bluecherry_build as bluecherry_build_cleaned ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -74,7 +74,7 @@ RUN rm -rf .ccache \ # --------------------------------------------------------------------------- # Install the bluecherry app and dependencies -#FROM baseos as bluecherry_install +FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root From fba68f249bb7182637e07b79b813b36e7c87fd39 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 21:01:34 -0500 Subject: [PATCH 39/57] Update Dockerfile --- server/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 3d03bfcc..b2fc11b2 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -5,7 +5,7 @@ ARG BLUECHERRY_GIT_BRANCH_TAG=master # --------------------------------------------------------------------------- # Build the base OS with some development libs and tools -#FROM baseos AS os_dev_environment +FROM baseos AS os_dev_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -24,7 +24,7 @@ RUN apt-get install --no-install-recommends -y \ # --------------------------------------------------------------------------- -#FROM os_dev_environment as bluecherry_base_environment +FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -48,7 +48,7 @@ RUN apt-get --no-install-recommends -y install \ # Build the bluecherry app and dependencies. This is done in a separate # image because there are many ways it can fail and then we save time # by being able to reuse prior containers leading up to this build. -#FROM bluecherry_base_environment as bluecherry_build +FROM bluecherry_base_environment as bluecherry_build ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -59,7 +59,7 @@ RUN cd bluecherry-apps \ # --------------------------------------------------------------------------- -#FROM bluecherry_build as bluecherry_build_cleaned +FROM bluecherry_build as bluecherry_build_cleaned ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root From 43782f33da9a6dffe76d583d1e41775bd7c6e505 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 22:24:53 -0500 Subject: [PATCH 40/57] Update Dockerfile --- server/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index b2fc11b2..0067cecf 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -80,7 +80,7 @@ WORKDIR /root COPY --from=bluecherry_build_cleaned \ /root/bluecherry-apps/releases/bluecherry_*.deb \ - /root/bluecherry-apps/releases/ + /root/bluecherry-apps/releases/ RUN ls -l /root/bluecherry-apps/releases/ @@ -149,7 +149,7 @@ RUN { \ # Cleanup tasks RUN apt-get clean \ - && rm -f bluecherry-apps/releases/bluecherry_*.deb \ +# && rm -f bluecherry-apps/releases/bluecherry_*.deb \ && rm -rf /var/lib/apt/lists/* # Remove these files -- we needed them to build the docker image, since the From 6dc1ca583847abba74b69c43b516fba4404a124f Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 22:59:19 -0500 Subject: [PATCH 41/57] Update Dockerfile --- server/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 0067cecf..cb654bab 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -48,7 +48,7 @@ RUN apt-get --no-install-recommends -y install \ # Build the bluecherry app and dependencies. This is done in a separate # image because there are many ways it can fail and then we save time # by being able to reuse prior containers leading up to this build. -FROM bluecherry_base_environment as bluecherry_build +#FROM bluecherry_base_environment as bluecherry_build ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -59,7 +59,7 @@ RUN cd bluecherry-apps \ # --------------------------------------------------------------------------- -FROM bluecherry_build as bluecherry_build_cleaned +#FROM bluecherry_build as bluecherry_build_cleaned ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -74,13 +74,13 @@ RUN rm -rf .ccache \ # --------------------------------------------------------------------------- # Install the bluecherry app and dependencies -FROM baseos as bluecherry_install +#FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -COPY --from=bluecherry_build_cleaned \ - /root/bluecherry-apps/releases/bluecherry_*.deb \ - /root/bluecherry-apps/releases/ +#COPY --from=bluecherry_build_cleaned \ +# /root/bluecherry-apps/releases/bluecherry_*.deb \ +# /root/bluecherry-apps/releases/ RUN ls -l /root/bluecherry-apps/releases/ From 63b7ecf2cb682a53b078d7d4ae011c004d8fce27 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sat, 23 Sep 2023 23:32:38 -0500 Subject: [PATCH 42/57] Update Dockerfile --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index cb654bab..31c3ffcc 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -111,7 +111,7 @@ ARG BLUECHERRY_LINUX_USER_ID=1000 RUN apt-get update \ && apt-get install -y \ rsyslog nmap curl sysstat iproute2 \ - openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl nano + openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl nano cron RUN { \ echo "[client]"; \ From f8aa0fbe4508059c1e7a85ff591d3ade9dbefc5f Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 24 Sep 2023 00:02:59 -0500 Subject: [PATCH 43/57] Update Dockerfile --- server/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 31c3ffcc..c075ab1d 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -48,7 +48,7 @@ RUN apt-get --no-install-recommends -y install \ # Build the bluecherry app and dependencies. This is done in a separate # image because there are many ways it can fail and then we save time # by being able to reuse prior containers leading up to this build. -#FROM bluecherry_base_environment as bluecherry_build +FROM bluecherry_base_environment as bluecherry_build ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -59,7 +59,7 @@ RUN cd bluecherry-apps \ # --------------------------------------------------------------------------- -#FROM bluecherry_build as bluecherry_build_cleaned +FROM bluecherry_build as bluecherry_build_cleaned ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root @@ -74,7 +74,7 @@ RUN rm -rf .ccache \ # --------------------------------------------------------------------------- # Install the bluecherry app and dependencies -#FROM baseos as bluecherry_install +FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root From 9bfe63faf8161998fac570a3739c2c38a0227738 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 24 Sep 2023 00:10:21 -0500 Subject: [PATCH 44/57] Update Dockerfile --- server/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index c075ab1d..3dbe4c57 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -78,9 +78,9 @@ FROM baseos as bluecherry_install ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root -#COPY --from=bluecherry_build_cleaned \ -# /root/bluecherry-apps/releases/bluecherry_*.deb \ -# /root/bluecherry-apps/releases/ +COPY --from=bluecherry_build_cleaned \ + /root/bluecherry-apps/releases/bluecherry_*.deb \ + /root/bluecherry-apps/releases/ RUN ls -l /root/bluecherry-apps/releases/ From 6398f9a2a59536d25f59ef42e2a480c503568b79 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 24 Sep 2023 20:05:36 -0500 Subject: [PATCH 45/57] Update entrypoint.sh --- server/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index e714df0f..8d623126 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -50,6 +50,10 @@ chown bluecherry:bluecherry /var/lib/bluecherry/recordings # the location permissions have to be reset on every start of the container: chmod 777 /proc/self/fd/1 +# Hack to fix race condition where rsyslog starts too soon and throws errors +# https://github.com/bluecherrydvr/bluecherry-docker/issues/26 + +sleep 5 echo "> /usr/sbin/rsyslogd" /usr/sbin/rsyslogd From 198d6080546de0eb1a59be6b875aa309fe0ee5b8 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 24 Sep 2023 21:03:55 -0500 Subject: [PATCH 46/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index 3dbe4c57..21a39c48 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -208,6 +208,7 @@ RUN chmod +x /entrypoint.sh \ #CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start +CMD /usr/sbin/php-fpm7.4 -D CMD ["/usr/sbin/nginx", "-g", "daemon off;"] CMD "/entrypoint.sh" From 5d8aac8bf709afc2cfe8bbd7b03c40c52624a13e Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Mon, 25 Sep 2023 20:12:48 -0500 Subject: [PATCH 47/57] Update Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4d81e86b..1ad663e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -302,4 +302,6 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade +CMD /etc/init.d/php7.4-fpm restart + CMD "/entrypoint.sh" From fb866a0737751b8d70b3af1e8d4bfa9ba226a8b3 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Mon, 25 Sep 2023 20:29:03 -0500 Subject: [PATCH 48/57] Update entrypoint.sh --- server/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 8d623126..1c687168 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -65,6 +65,9 @@ fi exec "$@" +/etc/init.d/php7.4-fpm start + + echo "> /usr/sbin/nginx" #source /etc/apache2/envvars /usr/sbin/nginx From 9da5d808eff0f78dd5783f8e24417bf9a9858481 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 26 Sep 2023 14:37:05 -0500 Subject: [PATCH 49/57] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index def2722c..357d46af 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -79,5 +79,5 @@ jobs: # password: ${{ secrets.DOCKER_PASSWORD }} # file: ./server/Dockerfile push: true - tags: bluecherrydvr/bluecherry:citesting + tags: bluecherrydvr/bluecherry:unstable labels: github_ci From 0540275f48153d7e0e3655f7868a3c7032ab8241 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 15 Oct 2023 13:03:18 -0500 Subject: [PATCH 50/57] Update Dockerfile --- server/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 21a39c48..3e30e055 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -22,7 +22,6 @@ RUN apt-get install --no-install-recommends -y \ linux-image-generic linux-headers-generic \ libmysqlclient-dev rsyslog - # --------------------------------------------------------------------------- FROM os_dev_environment as bluecherry_base_environment ENV DEBIAN_FRONTEND=noninteractive From 752c6f28c63eea39d744d934492bb0a3d8cac2ef Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 15 Oct 2023 21:28:22 -0500 Subject: [PATCH 51/57] Update Dockerfile --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index 3e30e055..467a4e86 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -204,6 +204,7 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade +RUN chown bluecherry.bluecherry -R /var/lib/bluecherry #CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start From 05295617a9fe022526e0ca3784a42e945db75fa7 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 15 Oct 2023 22:46:17 -0500 Subject: [PATCH 52/57] Update entrypoint.sh --- server/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 1c687168..6ec083ec 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -42,6 +42,7 @@ echo "> Writing /etc/bluecherry.conf" echo "> chown bluecherry:bluecherry /var/lib/bluecherry/recordings" chown bluecherry:bluecherry /var/lib/bluecherry/recordings +chown -R bluecherry:bluecherry /var/lib/bluecherry/.local/share/data/ # The bluecherry container's Dockerfile sets rsyslog to route the bluecherry From aff4d846e7080fb586be965f9866c425e1e0672c Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 22 Oct 2023 19:19:00 -0500 Subject: [PATCH 53/57] Update entrypoint.sh Remove any existing rsyslogd.pid before starting a new instance of rsyslogd --- server/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 6ec083ec..56ad5ab7 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -57,6 +57,7 @@ chmod 777 /proc/self/fd/1 sleep 5 echo "> /usr/sbin/rsyslogd" +rm -f /run/rsyslogd.pid /usr/sbin/rsyslogd status=$? if [ $status -ne 0 ]; then From d9ec3fec959b9e6be43fda94a2ee5a32c521c899 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Fri, 3 Nov 2023 18:38:27 -0500 Subject: [PATCH 54/57] Update Dockerfile From 03868a3d9ff70644e7dd531a81722b9a2b7b08c8 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Sun, 5 Nov 2023 00:32:51 -0500 Subject: [PATCH 55/57] Update Dockerfile --- server/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/Dockerfile b/server/Dockerfile index 467a4e86..9f29e4aa 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -204,6 +204,9 @@ RUN chmod +x /entrypoint.sh \ && chmod +x /bin/bc-database-create \ && chmod +x /bin/bc-database-upgrade +# Delete the default nginx config, we don't need it. +RUN rm /etc/nginx/sites-enabled/default + RUN chown bluecherry.bluecherry -R /var/lib/bluecherry #CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] From 078f05b5d47aa8cfac56cf4bfd863bb0a1dddbb4 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Nov 2023 18:38:11 -0600 Subject: [PATCH 56/57] Update entrypoint.sh --- server/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 56ad5ab7..049bb0e8 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -54,9 +54,11 @@ chmod 777 /proc/self/fd/1 # Hack to fix race condition where rsyslog starts too soon and throws errors # https://github.com/bluecherrydvr/bluecherry-docker/issues/26 +# sleep for 5 for good measure sleep 5 echo "> /usr/sbin/rsyslogd" +# rm rsyslog.pid to prevent respawning rm -f /run/rsyslogd.pid /usr/sbin/rsyslogd status=$? From cac7b76a0829616961220aa273a49a983ca9e5a1 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Thu, 9 Nov 2023 20:20:50 -0600 Subject: [PATCH 57/57] Update install.sh Fixes and closes #31 --- scripts/install.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 55da4cf1..39ae9de5 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -30,7 +30,7 @@ docker_compose_init() { #uptimekuma -echo "\n\nDownloading latest Bluecherry and related images...this may take a while...\n\n" +echo "Downloading latest Bluecherry and related images...this may take a while..." cd "$workingpath/bluecherry-docker" @@ -42,7 +42,7 @@ docker compose pull docker compose up bc-mysql -d echo "Sleeping 45 seconds to make sure the database is initialized correctly..." -echo "\n\n" + sleep 45 docker compose stop bc-mysql docker compose up -d bc-mysql @@ -76,7 +76,7 @@ Create a password for the mysql bluecherry user " echo "Time Zone (i.e. - America/Chicago): " -read timezone +read timezoneset #read -p "Time Zone (i.e. - America/Chicago):" timezone #timezoneset="${timezone:=American/Chicago}" @@ -257,7 +257,7 @@ case $distribution in "debian" | "ubuntu") install_debian_packages ;; - "centos" | "rhel" | "fedora") + "centos" | "rhel" | "fedora" | "rocky" | "Rocky") install_redhat_packages ;; "sles" | "opensuse" | "suse") @@ -311,6 +311,11 @@ install_suse_packages() { install_arch_packages() { pacman -Syu --noconfirm git install_docker + sed -i 's/^LimitNOFILE=infinity$/LimitNOFILE=1048576/' /usr/lib/systemd/system/docker.service + sed -i 's/^LimitNOFILE=infinity$/LimitNOFILE=1048576/' /usr/lib/systemd/system/containerd.service + systemctl start docker + systemctl enable docker + pacman -Syu --noconfirm docker-compose } # Function to install packages on Fedora @@ -390,7 +395,7 @@ docker_compose_init esac -read -p "Do you want to configure SMTP settings?? [y/n]: " smtp +read -p "Do you want to configure SMTP settings? [y/n]: " smtp case $smtp in y)