# Wazuh Docker Copyright (C) 2021 Wazuh Inc. (License GPLv2)
FROM ubuntu:20.04

ARG WAZUH_VERSION=4.3.0-1

# Update and install dependecies
RUN apt-get update && apt install curl -y

#Download and install Wazuh indexer
RUN curl https://packages-dev.wazuh.com/pre-release/apt/pool/main/w/wazuh-indexer/wazuh-indexer_${WAZUH_VERSION}_amd64.deb --output wazuh-indexer_${WAZUH_VERSION}_amd64.deb && \
    dpkg -i wazuh-indexer_${WAZUH_VERSION}_amd64.deb

COPY config/entrypoint.sh /

RUN chmod 700 /entrypoint.sh

# Services ports
EXPOSE 9700

ENTRYPOINT [ "/entrypoint.sh" ]