mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
bump elk stack to 6.5.1
fix docker hub build
This commit is contained in:
parent
b1ee78b1bc
commit
5e8345695f
4 changed files with 39 additions and 29 deletions
|
@ -4,7 +4,7 @@ FROM alpine
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U --no-cache add \
|
RUN apk -U add \
|
||||||
bash \
|
bash \
|
||||||
curl \
|
curl \
|
||||||
openjdk8-jre \
|
openjdk8-jre \
|
||||||
|
@ -13,8 +13,8 @@ RUN apk -U --no-cache add \
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
cd /root/dist/ && \
|
cd /root/dist/ && \
|
||||||
mkdir -p /usr/share/elasticsearch/ && \
|
mkdir -p /usr/share/elasticsearch/ && \
|
||||||
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.3.tar.gz && \
|
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.1.tar.gz && \
|
||||||
tar xvfz elasticsearch-6.4.3.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
tar xvfz elasticsearch-6.5.1.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||||
|
|
||||||
# Add and move files
|
# Add and move files
|
||||||
cd /root/dist/ && \
|
cd /root/dist/ && \
|
||||||
|
@ -29,7 +29,9 @@ RUN apk -U --no-cache add \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge wget && \
|
apk del --purge wget && \
|
||||||
rm -rf /root/*
|
rm -rf /root/* && \
|
||||||
|
rm -rf /tmp/* && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U --no-cache add \
|
RUN apk -U add \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
nodejs \
|
nodejs \
|
||||||
nodejs-npm && \
|
nodejs-npm && \
|
||||||
|
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
mkdir -p /usr/src/app/ && \
|
mkdir -p /usr/src/app/ && \
|
||||||
|
@ -20,7 +20,10 @@ RUN apk -U --no-cache add \
|
||||||
chown -R head:head /usr/src/app/ && \
|
chown -R head:head /usr/src/app/ && \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge git
|
apk del --purge git && \
|
||||||
|
rm -rf /root/* && \
|
||||||
|
rm -rf /tmp/* && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
||||||
|
|
|
@ -4,7 +4,7 @@ FROM alpine
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U --no-cache add \
|
RUN apk -U add \
|
||||||
curl \
|
curl \
|
||||||
nodejs \
|
nodejs \
|
||||||
wget && \
|
wget && \
|
||||||
|
@ -12,14 +12,12 @@ RUN apk -U --no-cache add \
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
cd /root/dist/ && \
|
cd /root/dist/ && \
|
||||||
mkdir -p /usr/share/kibana/ && \
|
mkdir -p /usr/share/kibana/ && \
|
||||||
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.4.3-linux-x86_64.tar.gz && \
|
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.5.1-linux-x86_64.tar.gz && \
|
||||||
tar xvfz kibana-6.4.3-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/kibana/ && \
|
tar xvfz kibana-6.5.1-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/kibana/ && \
|
||||||
|
|
||||||
# Kibana's bundled node does not work in alpine
|
# Kibana's bundled node does not work in alpine
|
||||||
rm /usr/share/kibana/node/bin/node && \
|
rm /usr/share/kibana/node/bin/node && \
|
||||||
rm /usr/share/kibana/node/bin/npm && \
|
|
||||||
ln -s /usr/bin/node /usr/share/kibana/node/bin/node && \
|
ln -s /usr/bin/node /usr/share/kibana/node/bin/node && \
|
||||||
ln -s /usr/bin/npm /usr/share/kibana/node/bin/npm && \
|
|
||||||
|
|
||||||
# Add and move files
|
# Add and move files
|
||||||
cd /root/dist/ && \
|
cd /root/dist/ && \
|
||||||
|
@ -45,17 +43,23 @@ RUN apk -U --no-cache add \
|
||||||
sed -i 's/#server.host: "localhost"/server.host: "0.0.0.0"/' /usr/share/kibana/config/kibana.yml && \
|
sed -i 's/#server.host: "localhost"/server.host: "0.0.0.0"/' /usr/share/kibana/config/kibana.yml && \
|
||||||
sed -i 's/#elasticsearch.url: "http:\/\/localhost:9200"/elasticsearch.url: "http:\/\/elasticsearch:9200"/' /usr/share/kibana/config/kibana.yml && \
|
sed -i 's/#elasticsearch.url: "http:\/\/localhost:9200"/elasticsearch.url: "http:\/\/elasticsearch:9200"/' /usr/share/kibana/config/kibana.yml && \
|
||||||
sed -i "s/#005571/#e20074/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav.less && \
|
sed -i "s/#005571/#e20074/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav.less && \
|
||||||
sed -i "s/#005571/#e20074/g" /usr/share/kibana/src/core_plugins/kibana/public/dashboard/styles/index.less && \
|
|
||||||
sed -i "s/globalColorBlue/globalColorMagenta/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav_link/global_nav_link.less && \
|
sed -i "s/globalColorBlue/globalColorMagenta/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav_link/global_nav_link.less && \
|
||||||
echo "@globalColorMagenta: #9E0051;" >> /usr/share/kibana/src/ui/public/styles/variables/colors.less && \
|
echo "@globalColorMagenta: #9E0051;" >> /usr/share/kibana/src/ui/public/styles/variables/colors.less && \
|
||||||
/usr/share/kibana/bin/kibana 2>&1 | grep -m 1 "Optimization of bundles" && \
|
echo "xpack.infra.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
|
||||||
|
echo "xpack.logstash.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
|
||||||
|
echo "xpack.canvas.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
|
||||||
|
echo "xpack.spaces.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
|
||||||
|
echo "xpack.apm.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
|
||||||
|
/usr/share/kibana/bin/kibana --optimize && \
|
||||||
addgroup -g 2000 kibana && \
|
addgroup -g 2000 kibana && \
|
||||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 kibana && \
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 kibana && \
|
||||||
chown -R kibana:kibana /usr/share/kibana/ && \
|
chown -R kibana:kibana /usr/share/kibana/ && \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge wget && \
|
apk del --purge wget && \
|
||||||
rm -rf /root/*
|
rm -rf /root/* && \
|
||||||
|
rm -rf /tmp/* && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:5601'
|
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:5601'
|
||||||
|
|
|
@ -4,22 +4,22 @@ FROM alpine
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U --no-cache add \
|
RUN apk -U add \
|
||||||
bash \
|
bash \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
libc6-compat \
|
libc6-compat \
|
||||||
libzmq \
|
libzmq \
|
||||||
openjdk8-jre \
|
openjdk8-jre \
|
||||||
wget && \
|
wget && \
|
||||||
|
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
git clone --depth=1 https://github.com/dtag-dev-sec/listbot /etc/listbot && \
|
git clone --depth=1 https://github.com/dtag-dev-sec/listbot /etc/listbot && \
|
||||||
cd /root/dist/ && \
|
cd /root/dist/ && \
|
||||||
mkdir -p /usr/share/logstash/ && \
|
mkdir -p /usr/share/logstash/ && \
|
||||||
wget https://artifacts.elastic.co/downloads/logstash/logstash-6.4.3.tar.gz && \
|
wget https://artifacts.elastic.co/downloads/logstash/logstash-6.5.1.tar.gz && \
|
||||||
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz && \
|
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz && \
|
||||||
tar xvfz logstash-6.4.3.tar.gz --strip-components=1 -C /usr/share/logstash/ && \
|
tar xvfz logstash-6.5.1.tar.gz --strip-components=1 -C /usr/share/logstash/ && \
|
||||||
/usr/share/logstash/bin/logstash-plugin install logstash-filter-translate && \
|
/usr/share/logstash/bin/logstash-plugin install logstash-filter-translate && \
|
||||||
/usr/share/logstash/bin/logstash-plugin install logstash-output-syslog && \
|
/usr/share/logstash/bin/logstash-plugin install logstash-output-syslog && \
|
||||||
tar xvfz GeoLite2-ASN.tar.gz --strip-components=1 -C /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/ && \
|
tar xvfz GeoLite2-ASN.tar.gz --strip-components=1 -C /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/ && \
|
||||||
|
@ -42,6 +42,7 @@ RUN apk -U --no-cache add \
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge wget && \
|
apk del --purge wget && \
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
|
rm -rf /tmp/* && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
|
@ -49,4 +50,4 @@ HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9600'
|
||||||
|
|
||||||
# Start logstash
|
# Start logstash
|
||||||
#USER logstash:logstash
|
#USER logstash:logstash
|
||||||
CMD update.sh && exec /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf
|
CMD update.sh && exec /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --java-execution
|
||||||
|
|
Loading…
Reference in a new issue