2024-06-01 15:56:36 +00:00
|
|
|
FROM ubuntu:24.04
|
2023-01-22 19:02:53 +00:00
|
|
|
|
|
|
|
ARG PACKAGE
|
2024-06-01 15:56:36 +00:00
|
|
|
ARG TARGETARCH
|
2023-01-22 19:02:53 +00:00
|
|
|
|
2024-06-01 15:56:36 +00:00
|
|
|
LABEL description="piler ubuntu noble image" \
|
2023-01-22 19:02:53 +00:00
|
|
|
maintainer="Janos SUTO, sj@acts.hu" \
|
|
|
|
package="${PACKAGE}"
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
2024-06-01 15:56:36 +00:00
|
|
|
DISTRO="noble" \
|
2023-01-22 19:02:53 +00:00
|
|
|
PILER_USER="piler" \
|
|
|
|
MYSQL_DATABASE="piler"
|
|
|
|
|
2024-06-01 15:56:36 +00:00
|
|
|
COPY ${PACKAGE}_${TARGETARCH}.deb /
|
2023-01-22 19:02:53 +00:00
|
|
|
|
2024-06-01 15:56:36 +00:00
|
|
|
# hadolint ignore=DL3008
|
2023-01-22 19:02:53 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get -y --no-install-recommends install \
|
2024-06-01 15:56:36 +00:00
|
|
|
wget openssl sysstat php8.3-cli php8.3-cgi php8.3-mysql php8.3-fpm php8.3-zip php8.3-ldap \
|
|
|
|
php8.3-gd php8.3-curl php8.3-xml php8.3-memcached catdoc unrtf poppler-utils nginx tnef sudo libzip4t64 \
|
|
|
|
libtre5 cron libmariadb-dev mariadb-client-core python3 python3-mysqldb ca-certificates curl rsyslog gnupg && \
|
2023-01-22 19:02:53 +00:00
|
|
|
wget https://repo.manticoresearch.com/manticore-repo.noarch.deb && \
|
|
|
|
dpkg -i manticore-repo.noarch.deb && \
|
|
|
|
rm -f manticore-repo.noarch.deb && \
|
|
|
|
apt-get update && \
|
2024-06-01 15:56:36 +00:00
|
|
|
apt-get install -y --no-install-recommends manticore manticore-columnar-lib && \
|
2023-01-22 19:02:53 +00:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron && \
|
2024-06-01 15:56:36 +00:00
|
|
|
dpkg -i ${PACKAGE}_${TARGETARCH}.deb && \
|
2023-01-22 19:02:53 +00:00
|
|
|
touch /etc/piler/MANTICORE && \
|
|
|
|
ln -sf /etc/piler/piler-nginx.conf /etc/nginx/sites-enabled && \
|
2024-06-01 15:56:36 +00:00
|
|
|
echo "www-data ALL=NOPASSWD: /etc/init.d/rc.piler reload" > /etc/sudoers.d/piler && \
|
|
|
|
rm -f ${PACKAGE}_${TARGETARCH}.deb /etc/nginx/sites-enabled/default /etc/piler/piler.key /etc/piler/piler.pem /etc/piler/config-site.php && \
|
2023-01-22 19:02:53 +00:00
|
|
|
crontab -u $PILER_USER /usr/share/piler/piler.cron
|
|
|
|
|
2023-01-26 20:48:51 +00:00
|
|
|
VOLUME ["/etc/piler","/var/piler/store","/var/piler/manticore","/var/piler/imap","/var/piler/stat","/var/spool/cron/crontabs"]
|
2023-01-22 19:02:53 +00:00
|
|
|
|
2023-01-26 20:48:51 +00:00
|
|
|
EXPOSE 25/tcp
|
|
|
|
EXPOSE 80/tcp
|
|
|
|
EXPOSE 443/tcp
|
|
|
|
|
|
|
|
# Clean up APT when done.
|
|
|
|
RUN apt clean && \
|
|
|
|
apt autoremove && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2023-01-22 19:02:53 +00:00
|
|
|
|
|
|
|
COPY start.sh /start.sh
|
|
|
|
|
2023-01-26 20:48:51 +00:00
|
|
|
# chmod start.sh
|
|
|
|
RUN chmod a+x /start.sh
|
|
|
|
|
|
|
|
CMD ["/start.sh"]
|