mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
replace es-head with elasticvue, tweaking
es-head does not support building with ARM64 and had to be replaced with the even better elasticvue elasticvue will now run within the nginx container, freeing some RAM :) on the way
This commit is contained in:
36
docker/deprecated/head/Dockerfile
Normal file
36
docker/deprecated/head/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM alpine:3.15
|
||||
#
|
||||
# Setup env and apt
|
||||
RUN apk -U add \
|
||||
curl \
|
||||
git \
|
||||
nodejs \
|
||||
#nodejs-npm && \
|
||||
npm && \
|
||||
#
|
||||
# Get and install packages
|
||||
mkdir -p /usr/src/app/ && \
|
||||
cd /usr/src/app/ && \
|
||||
git clone https://github.com/mobz/elasticsearch-head . && \
|
||||
git checkout 2d51fecac2980d350fcd3319fd9fe2999f63c9db && \
|
||||
npm install http-server && \
|
||||
sed -i "s#\"http\:\/\/localhost\:9200\"#window.location.protocol \+ \'\/\/\' \+ window.location.hostname \+ \'\:\' \+ window.location.port \+ \'\/es\/\'#" /usr/src/app/_site/app.js && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 head && \
|
||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 head && \
|
||||
chown -R head:head /usr/src/app/ && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge git && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
#
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
||||
#
|
||||
# Start elasticsearch-head
|
||||
USER head:head
|
||||
WORKDIR /usr/src/app
|
||||
CMD ["node_modules/http-server/bin/http-server", "_site", "-p", "9100"]
|
16
docker/deprecated/head/docker-compose.yml
Normal file
16
docker/deprecated/head/docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: '2.3'
|
||||
|
||||
services:
|
||||
|
||||
## Elasticsearch-head service
|
||||
head:
|
||||
build: .
|
||||
container_name: head
|
||||
restart: always
|
||||
# depends_on:
|
||||
# elasticsearch:
|
||||
# condition: service_healthy
|
||||
ports:
|
||||
- "127.0.0.1:64302:9100"
|
||||
image: "dtagdevsec/head:2203"
|
||||
read_only: true
|
Reference in New Issue
Block a user