mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
Remove legacy builder
This commit is contained in:
parent
680671b9dc
commit
33a197f4a6
2 changed files with 0 additions and 323 deletions
|
@ -1,120 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Buildx Example: docker buildx build --platform linux/amd64,linux/arm64 -t username/demo:latest --push .
|
||||
|
||||
# Setup Vars
|
||||
myPLATFORMS="linux/amd64,linux/arm64"
|
||||
myHUBORG_DOCKER="dtagdevsec"
|
||||
myHUBORG_GITHUB="ghcr.io/telekom-security"
|
||||
myTAG="24.04"
|
||||
#myIMAGESBASE="tpotinit adbhoney ciscoasa citrixhoneypot conpot cowrie ddospot dicompot dionaea elasticpot endlessh ewsposter fatt glutton hellpot heralding honeypots honeytrap ipphoney log4pot mailoney medpot nginx p0f redishoneypot sentrypeer spiderfoot suricata wordpot"
|
||||
myIMAGESBASE="tpotinit adbhoney ciscoasa citrixhoneypot conpot cowrie ddospot dicompot dionaea elasticpot endlessh ewsposter fatt hellpot heralding honeypots honeytrap ipphoney log4pot mailoney medpot nginx p0f redishoneypot sentrypeer spiderfoot suricata wordpot"
|
||||
myIMAGESELK="elasticsearch kibana logstash map"
|
||||
myIMAGESTANNER="phpox redis snare tanner"
|
||||
myBUILDERLOG="builder.log"
|
||||
myBUILDERERR="builder.err"
|
||||
myBUILDCACHE="/buildcache"
|
||||
|
||||
# Got root?
|
||||
myWHOAMI=$(whoami)
|
||||
if [ "$myWHOAMI" != "root" ]
|
||||
then
|
||||
echo "Need to run as root ..."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for Buildx
|
||||
docker buildx > /dev/null 2>&1
|
||||
if [ "$?" == "1" ];
|
||||
then
|
||||
echo "### Build environment not setup. Install docker engine from docker:"
|
||||
echo "### https://docs.docker.com/engine/install/debian/"
|
||||
fi
|
||||
|
||||
# Let's ensure arm64 and amd64 are supported
|
||||
echo "### Let's ensure ARM64 and AMD64 are supported ..."
|
||||
myARCHITECTURES="amd64 arm64"
|
||||
mySUPPORTED=$(docker buildx inspect --bootstrap)
|
||||
|
||||
for i in $myARCHITECTURES;
|
||||
do
|
||||
if ! echo $mySUPPORTED | grep -q linux/$i;
|
||||
then
|
||||
echo "## Installing $i support ..."
|
||||
docker run --privileged --rm tonistiigi/binfmt --install $i
|
||||
docker buildx inspect --bootstrap
|
||||
else
|
||||
echo "## $i support detected!"
|
||||
fi
|
||||
done
|
||||
echo
|
||||
|
||||
# Let's ensure we have builder created with cache support
|
||||
echo "### Checking for mybuilder ..."
|
||||
if ! docker buildx ls | grep -q mybuilder;
|
||||
then
|
||||
echo "## Setting up mybuilder ..."
|
||||
docker buildx create --name mybuilder
|
||||
# Set as default, otherwise local cache is not supported
|
||||
docker buildx use mybuilder
|
||||
docker buildx inspect --bootstrap
|
||||
else
|
||||
echo "## Found mybuilder!"
|
||||
fi
|
||||
echo
|
||||
|
||||
# Only run with command switch
|
||||
if [ "$1" == "" ]; then
|
||||
echo "### T-Pot Multi Arch Image Builder."
|
||||
echo "## Usage: builder.sh [build, push]"
|
||||
echo "## build - Just build images, do not push."
|
||||
echo "## push - Build and push images."
|
||||
echo "## Pushing requires an active docker login."
|
||||
exit
|
||||
fi
|
||||
|
||||
fuBUILDIMAGES () {
|
||||
local myPATH="$1"
|
||||
local myIMAGELIST="$2"
|
||||
local myPUSHOPTION="$3"
|
||||
|
||||
for myREPONAME in $myIMAGELIST;
|
||||
do
|
||||
echo -n "Now building: $myREPONAME in $myPATH$myREPONAME/."
|
||||
docker buildx build --cache-from "type=local,src=$myBUILDCACHE" \
|
||||
--cache-to "type=local,dest=$myBUILDCACHE" \
|
||||
--platform $myPLATFORMS \
|
||||
-t $myHUBORG_DOCKER/$myREPONAME:$myTAG \
|
||||
-t $myHUBORG_GITHUB/$myREPONAME:$myTAG \
|
||||
$myPUSHOPTION $myPATH$myREPONAME/. >> $myBUILDERLOG 2>&1
|
||||
if [ "$?" != "0" ];
|
||||
then
|
||||
echo " [ ERROR ] - Check logs!"
|
||||
echo "Error building $myREPONAME" >> "$myBUILDERERR"
|
||||
else
|
||||
echo " [ OK ]"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Just build images
|
||||
if [ "$1" == "build" ];
|
||||
then
|
||||
mkdir -p $myBUILDCACHE
|
||||
rm -f "$myBUILDERLOG" "$myBUILDERERR"
|
||||
echo "### Building images ..."
|
||||
fuBUILDIMAGES "" "$myIMAGESBASE" ""
|
||||
fuBUILDIMAGES "elk/" "$myIMAGESELK" ""
|
||||
fuBUILDIMAGES "tanner/" "$myIMAGESTANNER" ""
|
||||
fi
|
||||
|
||||
# Build and push images
|
||||
if [ "$1" == "push" ];
|
||||
then
|
||||
mkdir -p $myBUILDCACHE
|
||||
rm -f "$myBUILDERLOG" "$myBUILDERERR"
|
||||
echo "### Building and pushing images ..."
|
||||
fuBUILDIMAGES "" "$myIMAGESBASE" "--push"
|
||||
fuBUILDIMAGES "elk/" "$myIMAGESELK" "--push"
|
||||
fuBUILDIMAGES "tanner/" "$myIMAGESTANNER" "--push"
|
||||
fi
|
|
@ -1,203 +0,0 @@
|
|||
# T-Pot Image Builder (use only for building docker images)
|
||||
services:
|
||||
|
||||
##################
|
||||
#### Honeypots
|
||||
##################
|
||||
|
||||
# Adbhoney service
|
||||
adbhoney:
|
||||
build: adbhoney/.
|
||||
image: "dtagdevsec/adbhoney:24.04"
|
||||
|
||||
# Ciscoasa service
|
||||
ciscoasa:
|
||||
build: ciscoasa/.
|
||||
image: "dtagdevsec/ciscoasa:24.04"
|
||||
|
||||
# CitrixHoneypot service
|
||||
citrixhoneypot:
|
||||
build: citrixhoneypot/.
|
||||
image: "dtagdevsec/citrixhoneypot:24.04"
|
||||
|
||||
# Conpot IEC104 service
|
||||
conpot_IEC104:
|
||||
build: conpot/.
|
||||
image: "dtagdevsec/conpot:24.04"
|
||||
|
||||
# Cowrie service
|
||||
cowrie:
|
||||
build: cowrie/.
|
||||
image: "dtagdevsec/cowrie:24.04"
|
||||
|
||||
# Ddospot service
|
||||
ddospot:
|
||||
build: ddospot/.
|
||||
image: "dtagdevsec/ddospot:24.04"
|
||||
|
||||
# Dicompot service
|
||||
dicompot:
|
||||
build: dicompot/.
|
||||
image: "dtagdevsec/dicompot:24.04"
|
||||
|
||||
# Dionaea service
|
||||
dionaea:
|
||||
build: dionaea/.
|
||||
image: "dtagdevsec/dionaea:24.04"
|
||||
|
||||
# ElasticPot service
|
||||
elasticpot:
|
||||
build: elasticpot/.
|
||||
image: "dtagdevsec/elasticpot:24.04"
|
||||
|
||||
# Endlessh service
|
||||
endlessh:
|
||||
build: endlessh/.
|
||||
image: "dtagdevsec/endlessh:24.04"
|
||||
|
||||
# Glutton service
|
||||
# glutton:
|
||||
# build: glutton/.
|
||||
# image: "dtagdevsec/glutton:24.04"
|
||||
|
||||
# Hellpot service
|
||||
hellpot:
|
||||
build: hellpot/.
|
||||
image: "dtagdevsec/hellpot:24.04"
|
||||
|
||||
# Heralding service
|
||||
heralding:
|
||||
build: heralding/.
|
||||
image: "dtagdevsec/heralding:24.04"
|
||||
|
||||
# Honeypots service
|
||||
honeypots:
|
||||
build: honeypots/.
|
||||
image: "dtagdevsec/honeypots:24.04"
|
||||
|
||||
# Honeytrap service
|
||||
honeytrap:
|
||||
build: honeytrap/.
|
||||
image: "dtagdevsec/honeytrap:24.04"
|
||||
|
||||
# IPPHoney service
|
||||
ipphoney:
|
||||
build: ipphoney/.
|
||||
image: "dtagdevsec/ipphoney:24.04"
|
||||
|
||||
# Log4Pot service
|
||||
log4pot:
|
||||
build: log4pot/.
|
||||
image: "dtagdevsec/log4pot:24.04"
|
||||
|
||||
# Mailoney service
|
||||
mailoney:
|
||||
build: mailoney/.
|
||||
image: "dtagdevsec/mailoney:24.04"
|
||||
|
||||
# Medpot service
|
||||
medpot:
|
||||
build: medpot/.
|
||||
image: "dtagdevsec/medpot:24.04"
|
||||
|
||||
# Redishoneypot service
|
||||
redishoneypot:
|
||||
build: redishoneypot/.
|
||||
image: "dtagdevsec/redishoneypot:24.04"
|
||||
|
||||
# Sentrypeer service
|
||||
sentrypeer:
|
||||
build: sentrypeer/.
|
||||
image: "dtagdevsec/sentrypeer:24.04"
|
||||
|
||||
#### Snare / Tanner
|
||||
## Tanner Redis Service
|
||||
tanner_redis:
|
||||
build: tanner/redis/.
|
||||
image: "dtagdevsec/redis:24.04"
|
||||
|
||||
## PHP Sandbox service
|
||||
tanner_phpox:
|
||||
build: tanner/phpox/.
|
||||
image: "dtagdevsec/phpox:24.04"
|
||||
|
||||
## Tanner API Service
|
||||
tanner_api:
|
||||
build: tanner/tanner/.
|
||||
image: "dtagdevsec/tanner:24.04"
|
||||
|
||||
## Snare Service
|
||||
snare:
|
||||
build: tanner/snare/.
|
||||
image: "dtagdevsec/snare:24.04"
|
||||
|
||||
## Wordpot Service
|
||||
wordpot:
|
||||
build: wordpot/.
|
||||
image: "dtagdevsec/wordpot:24.04"
|
||||
|
||||
|
||||
##################
|
||||
#### NSM
|
||||
##################
|
||||
|
||||
# Fatt service
|
||||
fatt:
|
||||
build: fatt/.
|
||||
image: "dtagdevsec/fatt:24.04"
|
||||
|
||||
# P0f service
|
||||
p0f:
|
||||
build: p0f/.
|
||||
image: "dtagdevsec/p0f:24.04"
|
||||
|
||||
# Suricata service
|
||||
suricata:
|
||||
build: suricata/.
|
||||
image: "dtagdevsec/suricata:24.04"
|
||||
|
||||
|
||||
##################
|
||||
#### Tools
|
||||
##################
|
||||
|
||||
# T-Pot Init Service
|
||||
tpotinit:
|
||||
build: tpotinit/.
|
||||
image: "dtagdevsec/tpotinit:24.04"
|
||||
|
||||
#### ELK
|
||||
## Elasticsearch service
|
||||
elasticsearch:
|
||||
build: elk/elasticsearch/.
|
||||
image: "dtagdevsec/elasticsearch:24.04"
|
||||
|
||||
## Kibana service
|
||||
kibana:
|
||||
build: elk/kibana/.
|
||||
image: "dtagdevsec/kibana:24.04"
|
||||
|
||||
## Logstash service
|
||||
logstash:
|
||||
build: elk/logstash/.
|
||||
image: "dtagdevsec/logstash:24.04"
|
||||
|
||||
# Ewsposter service
|
||||
ewsposter:
|
||||
build: ewsposter/.
|
||||
image: "dtagdevsec/ewsposter:24.04"
|
||||
|
||||
# Nginx service
|
||||
nginx:
|
||||
build: nginx/.
|
||||
image: "dtagdevsec/nginx:24.04"
|
||||
|
||||
# Spiderfoot service
|
||||
spiderfoot:
|
||||
build: spiderfoot/.
|
||||
image: "dtagdevsec/spiderfoot:24.04"
|
||||
|
||||
# Map Web Service
|
||||
map_web:
|
||||
build: elk/map/.
|
||||
image: "dtagdevsec/map:24.04"
|
Loading…
Reference in a new issue