diff --git a/docker/images/wzd-dev.Dockerfile b/docker/images/wzd-dev.Dockerfile new file mode 100644 index 0000000000..07ff77cf60 --- /dev/null +++ b/docker/images/wzd-dev.Dockerfile @@ -0,0 +1,24 @@ +# Usage: docker build --build-arg NODE_VERSION=16.20.0 --build-arg WAZUH_DASHBOARD_VERSION=4.6.0 -t quay.io/wazuh/osd-dev:4.6.0 -f wzd-dev.Dockerfile . + +ARG NODE_VERSION +FROM node:${NODE_VERSION} AS base +ARG WAZUH_DASHBOARD_VERSION +USER node +RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_VERSION} https://github.com/wazuh/wazuh-dashboard.git /home/node/kbn +RUN chown node.node /home/node/kbn + +WORKDIR /home/node/kbn +RUN yarn osd bootstrap --production + + +WORKDIR /home/node/kbn/plugins +RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_VERSION} https://github.com/wazuh/wazuh-security-dashboards-plugin.git +WORKDIR /home/node/kbn/plugins/wazuh-security-dashboards-plugin +RUN yarn install + +RUN mkdir -p /home/node/kbn/data/wazuh/config + +FROM node:${NODE_VERSION} +USER node +COPY --chown=node:node --from=base /home/node/kbn /home/node/kbn +WORKDIR /home/node/kbn diff --git a/docker/osd-dev/dev.sh b/docker/osd-dev/dev.sh index b58e218728..426eade63a 100755 --- a/docker/osd-dev/dev.sh +++ b/docker/osd-dev/dev.sh @@ -9,6 +9,8 @@ os_versions=( '2.4.0' '2.4.1' '2.6.0' + '2.8.0' + '2.9.0' ) osd_versions=( @@ -20,6 +22,8 @@ osd_versions=( '2.4.0' '2.4.1' '2.6.0' + '4.6.0' + '4.7.0' ) usage() { @@ -71,9 +75,16 @@ export OSD_VERSION=$2 export OSD_PORT=${PORT:-5601} export IMPOSTER_PORT=8081 export SRC=$3 -export OSD_MAJOR=$(echo $OSD_VERSION | cut -d. -f1).x +export OSD_MAJOR_NUMBER=$(echo $OSD_VERSION | cut -d. -f1) export COMPOSE_PROJECT_NAME=os-dev-${OSD_VERSION//./} +if [[ "$OSD_MAJOR_NUMBER" -ge 2 ]]; +then + export OSD_MAJOR="2.x" +else + export OSD_MAJOR="1.x" +fi + profile="standard" export WAZUH_DASHBOARD_CONF=./config/${OSD_MAJOR}/osd/opensearch_dashboards.yml export SEC_CONFIG_FILE=./config/${OSD_MAJOR}/os/config.yml