From 9c053f6cdbba0a14af026a4d79e769f2b82f32f7 Mon Sep 17 00:00:00 2001 From: Leopere <1068374+Leopere@users.noreply.github.com> Date: Mon, 28 Feb 2022 00:32:13 -0500 Subject: [PATCH] Make buildable again with new OS base image. Requires Buildkit to reduce container layers. export DOCKER_BUILDKIT=1 # or configure in daemon.json export COMPOSE_DOCKER_CLI_BUILD=1 --- Dockerfile | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d6981b..b8b466f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,30 @@ -FROM centos:latest +FROM rockylinux:latest MAINTAINER Support ADD default_agent /var/ossec/default_agent + # copy base config -ADD ossec.conf /var/ossec/etc/ +COPY --chmod=755 ossec.conf /var/ossec/etc/ossec.conf + # Initialize the data volume configuration ADD data_dirs.env /data_dirs.env -ADD init.sh /init.sh - +COPY --chmod=755 init.sh /init.sh - -# # Add the bootstrap script -# -ADD ossec-server.sh /ossec-server.sh +COPY --chmod=755 ossec-server.sh /ossec-server.sh RUN \ yum -y update && \ - yum -y install wget useradd postfix && \ + yum -y install wget postfix && \ yum clean all && \ cd /root; NON_INT=1 wget -q -O - https://updates.atomicorp.com/installers/atomic |sh && \ yum -y install ossec-hids-server && \ - chmod 755 /ossec-server.sh && \ - chmod 755 /init.sh && \ sync && /init.sh &&\ sync && rm /init.sh -# # Specify the data volume -# VOLUME ["/var/ossec/data"] -# Expose ports for sharing -EXPOSE 1514/udp 1515/tcp - -# # Define default command. -# ENTRYPOINT ["/ossec-server.sh"]