Skip to content

Commit

Permalink
Add kbn-dev 7.17.11 (#5633)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 authored Jul 5, 2023
1 parent 19349eb commit 5958e78
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 35 deletions.
17 changes: 17 additions & 0 deletions docker/images/kbn-7.17.11-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:16.20.1 AS builder-kbn-7.17.11
RUN npm install --global @bazel/bazelisk@1.10.1
USER node
RUN git clone --depth 1 --branch v7.17.11 https://github.com/elastic/kibana /home/node/kbn
RUN chown node.node /home/node/kbn

WORKDIR /home/node/kbn
RUN yarn kbn bootstrap
RUN yarn config set registry http://host.docker.internal:4873 && \
sed -i 's/https:\/\/registry.yarnpkg.com/http:\/\/host.docker.internal:4873/g' yarn.lock
RUN rm -rf /home/node/.cache/yarn && rm -rf /home/node/.cache/Cypress && rm -rf /home/node/.cache/ms-playwright
RUN mkdir -p /home/node/kbn/data/wazuh/config

FROM node:16.20.1
USER node
COPY --from=builder-kbn-7.17.11 /home/node/ /home/node/
WORKDIR /home/node/kbn
66 changes: 31 additions & 35 deletions docker/kbn-dev/dev.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash


elastic_versions=(
'7.10.2'
'7.16.0'
Expand All @@ -11,23 +10,23 @@ elastic_versions=(
'7.17.4'
'7.17.5'
'7.17.6'
'7.17.7'
'7.17.8'
'7.17.9'
'7.17.10'
'7.17.7'
'7.17.8'
'7.17.9'
'7.17.10'
'7.17.11'
'8.0.0'
'8.1.0'
'8.2.1'
'8.2.3'
'8.3.0'
'8.3.1'
'8.3.3'
'8.4.2'
'8.4.3'
'8.5.0'
'8.3.3'
'8.4.2'
'8.4.3'
'8.5.0'
)


usage() {
echo
echo "./dev.sh elastic_version /wazuh_app_src action "
Expand All @@ -39,19 +38,16 @@ usage() {
exit -1
}


if [ $# -ne 3 ]
then
echo "Incorrect number of arguments " $# ", got " $@
echo
usage
if [ $# -ne 3 ]; then
echo "Incorrect number of arguments " $# ", got " $@
echo
usage
fi

if [[ ! " ${elastic_versions[*]} " =~ " ${1} " ]]
then
echo "Version ${1} not found in ${elastic_versions[*]}"
echo
exit -1
if [[ ! " ${elastic_versions[*]} " =~ " ${1} " ]]; then
echo "Version ${1} not found in ${elastic_versions[*]}"
echo
exit -1
fi

if [[ $2 != /* ]]; then
Expand All @@ -71,18 +67,18 @@ export SRC=$2
export COMPOSE_PROJECT_NAME=es-dev-${ES_VERSION//./} # /./ removes dots: 7.10.2 => 7102

case "$3" in
up)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} up -Vd
;;
down)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} down -v --remove-orphans
;;
stop)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} stop
;;
*)
echo "Action must be up | down | stop: "
echo
usage
;;
up)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} up -Vd
;;
down)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} down -v --remove-orphans
;;
stop)
docker compose -f dev.yml -p ${COMPOSE_PROJECT_NAME} stop
;;
*)
echo "Action must be up | down | stop: "
echo
usage
;;
esac

0 comments on commit 5958e78

Please sign in to comment.