Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
FROM centos:latest
FROM rockylinux:latest
MAINTAINER Support <[email protected]>


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"]