From 046ecc722c4d3e95914d188e7d888d140425a238 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Jan 2025 19:24:28 -0600 Subject: [PATCH 1/5] Update Dockerfile Fixes missing curl.h header --- actions/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/Dockerfile b/actions/Dockerfile index bf5e4822..0e55535f 100644 --- a/actions/Dockerfile +++ b/actions/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update 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++ \ + autoconf automake libtool build-essential gcc g++ libcurl4-openssl-dev \ debhelper ccache bison flex texinfo yasm cmake RUN apt-get install --no-install-recommends -y \ From d6f6567e682c74111a48115bb6d91b96ad3b6ffb Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Jan 2025 20:42:49 -0600 Subject: [PATCH 2/5] Update Dockerfile Force PKG_CONFIG_PATH --- actions/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/Dockerfile b/actions/Dockerfile index 0e55535f..8fdda190 100644 --- a/actions/Dockerfile +++ b/actions/Dockerfile @@ -21,6 +21,9 @@ 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 + +ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig +ls -ltrc /usr/include/x86_64-linux-gnu/curl/curl.h # --------------------------------------------------------------------------- FROM os_dev_environment as bluecherry_base_environment From 8bcf4fbc9d314476112ba1489287ed91fe821fd8 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Jan 2025 20:44:47 -0600 Subject: [PATCH 3/5] Update Dockerfile Verify curl.h actually exists --- actions/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/Dockerfile b/actions/Dockerfile index 8fdda190..7b883cb5 100644 --- a/actions/Dockerfile +++ b/actions/Dockerfile @@ -23,7 +23,7 @@ RUN apt-get install --no-install-recommends -y \ libmysqlclient-dev rsyslog ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig -ls -ltrc /usr/include/x86_64-linux-gnu/curl/curl.h +RUN ls -ltrc /usr/include/x86_64-linux-gnu/curl/curl.h # --------------------------------------------------------------------------- FROM os_dev_environment as bluecherry_base_environment From 26afa53aeae8ee9ece1f994b722be47c36f52043 Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Jan 2025 20:58:22 -0600 Subject: [PATCH 4/5] Update Dockerfile Smack policy-rc.d with a big stick --- actions/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/actions/Dockerfile b/actions/Dockerfile index 7b883cb5..a0cc50ea 100644 --- a/actions/Dockerfile +++ b/actions/Dockerfile @@ -116,6 +116,12 @@ RUN apt-get update \ rsyslog nmap curl sysstat iproute2 \ openssl ca-certificates ssl-cert gnupg gnupg2 gnupg1 sudo mysql-client python3-pip wget curl nano cron +# Allow service commands during installation +RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d + +# Ensure noninteractive mode +ENV DEBIAN_FRONTEND=noninteractive + RUN { \ echo "[client]"; \ echo "user=$MYSQL_ADMIN_LOGIN"; \ @@ -162,6 +168,9 @@ RUN apt-get clean \ RUN rm -f /root/.my.cnf \ && rm -f /etc/bluecherry.conf +RUN rm /usr/sbin/policy-rc.d + + # When running rsyslog in a container, we need to disable imklog # since the in-container process won't be allowed access to it. RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf From f2c5af4950f47c73cf43eda05c881bf1fa32952a Mon Sep 17 00:00:00 2001 From: Curtis Hall Date: Tue, 7 Jan 2025 21:27:55 -0600 Subject: [PATCH 5/5] Update Dockerfile More attempts... --- actions/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/actions/Dockerfile b/actions/Dockerfile index a0cc50ea..5ce5f569 100644 --- a/actions/Dockerfile +++ b/actions/Dockerfile @@ -118,6 +118,7 @@ RUN apt-get update \ # Allow service commands during installation RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d +RUN echo "rsyslog rsyslog/restart_on_upgrade boolean false" | debconf-set-selections # Ensure noninteractive mode ENV DEBIAN_FRONTEND=noninteractive @@ -153,8 +154,9 @@ RUN { \ echo bluecherry bluecherry/db_user string $BLUECHERRY_DB_USER; \ echo bluecherry bluecherry/db_password password $BLUECHERRY_DB_PASSWORD; \ } | debconf-set-selections \ - && export host=$BLUECHERRY_DB_HOST \ - && apt install -y --no-install-recommends ./bluecherry-apps/releases/bluecherry_*.deb + && export host=$BLUECHERRY_DB_HOST +#apt install -y --no-install-recommends ./bluecherry-apps/releases/bluecherry_*.deb +RUN DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y ./bluecherry-apps/releases/bluecherry_*.deb # Cleanup tasks RUN apt-get clean \ @@ -168,8 +170,6 @@ RUN apt-get clean \ RUN rm -f /root/.my.cnf \ && rm -f /etc/bluecherry.conf -RUN rm /usr/sbin/policy-rc.d - # When running rsyslog in a container, we need to disable imklog # since the in-container process won't be allowed access to it. @@ -222,6 +222,7 @@ RUN chmod +x /entrypoint.sh \ RUN rm /etc/nginx/sites-enabled/default RUN chown bluecherry.bluecherry -R /var/lib/bluecherry +RUN rm /usr/sbin/policy-rc.d #CMD rm -f /var/run/rsyslogd.pid #CMD ["/usr/sbin/rsyslogd", "-n", "-f", "/etc/rsyslog.conf"] #CMD service rsyslog start