mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
elk 7.x dev test
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
FROM alpine
|
||||
#
|
||||
# VARS
|
||||
ENV ES_VER=7.5.2 \
|
||||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
@ -10,13 +13,13 @@ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||
bash \
|
||||
curl \
|
||||
nss \
|
||||
openjdk8-jre && \
|
||||
openjdk11-jre && \
|
||||
#
|
||||
# Get and install packages
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/ && \
|
||||
aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.6.tar.gz && \
|
||||
tar xvfz elasticsearch-6.8.6.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||
aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VER-linux-x86_64.tar.gz && \
|
||||
tar xvfz elasticsearch-$ES_VER-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||
#
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
@ -40,5 +43,4 @@ HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
||||
#
|
||||
# Start ELK
|
||||
USER elasticsearch:elasticsearch
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
|
||||
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]
|
||||
|
46
docker/elk/elasticsearch/Dockerfile.new
Normal file
46
docker/elk/elasticsearch/Dockerfile.new
Normal file
@ -0,0 +1,46 @@
|
||||
FROM alpine
|
||||
#
|
||||
# VARS
|
||||
ENV ES_VER=7.5.2 \
|
||||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
# Setup env and apt
|
||||
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||
apk -U --no-cache add \
|
||||
aria2 \
|
||||
bash \
|
||||
curl \
|
||||
nss \
|
||||
openjdk11-jre && \
|
||||
#
|
||||
# Get and install packages
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/ && \
|
||||
aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VER-linux-x86_64.tar.gz && \
|
||||
tar xvfz elasticsearch-$ES_VER-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||
#
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/config && \
|
||||
cp elasticsearch.yml /usr/share/elasticsearch/config/ && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 elasticsearch && \
|
||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticsearch && \
|
||||
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \
|
||||
rm -rf /usr/share/elasticsearch/modules/x-pack-ml && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge aria2 && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
#
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
||||
#
|
||||
# Start ELK
|
||||
USER elasticsearch:elasticsearch
|
||||
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]
|
44
docker/elk/elasticsearch/Dockerfile.old
Normal file
44
docker/elk/elasticsearch/Dockerfile.old
Normal file
@ -0,0 +1,44 @@
|
||||
FROM alpine
|
||||
#
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
# Setup env and apt
|
||||
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||
apk -U --no-cache add \
|
||||
aria2 \
|
||||
bash \
|
||||
curl \
|
||||
nss \
|
||||
openjdk8-jre && \
|
||||
#
|
||||
# Get and install packages
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/ && \
|
||||
aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.6.tar.gz && \
|
||||
tar xvfz elasticsearch-6.8.6.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||
#
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/config && \
|
||||
cp elasticsearch.yml /usr/share/elasticsearch/config/ && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 elasticsearch && \
|
||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticsearch && \
|
||||
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \
|
||||
rm -rf /usr/share/elasticsearch/modules/x-pack-ml && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge aria2 && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
#
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
||||
#
|
||||
# Start ELK
|
||||
USER elasticsearch:elasticsearch
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
|
||||
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]
|
@ -1,11 +1,14 @@
|
||||
cluster.name: tpotcluster
|
||||
node.name: "tpotcluster-node-01"
|
||||
xpack.ml.enabled: false
|
||||
xpack.security.enabled: false
|
||||
path:
|
||||
logs: /data/elk/log
|
||||
data: /data/elk/data
|
||||
http.host: 0.0.0.0
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
||||
cluster.initial_master_nodes:
|
||||
- "tpotcluster-node-01"
|
||||
discovery.zen.ping.unicast.hosts:
|
||||
- localhost
|
||||
- localhost
|
||||
|
@ -24,6 +24,6 @@ services:
|
||||
mem_limit: 2g
|
||||
ports:
|
||||
- "127.0.0.1:64298:9200"
|
||||
image: "dtagdevsec/elasticsearch:1903"
|
||||
image: "dtagdevsec/elasticsearch:2006"
|
||||
volumes:
|
||||
- /data:/data
|
||||
|
Reference in New Issue
Block a user