mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-28 19:28:50 +00:00
44 lines
1.3 KiB
Bash
Executable file
44 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
########################################################
|
|
# T-Pot #
|
|
# Export docker images maker #
|
|
# #
|
|
# v0.01 by mo, DTAG, 2015-08-11 #
|
|
########################################################
|
|
|
|
# This feature is experimental and requires at least docker 1.7!
|
|
# Using any docker version < 1.7 may result in a unusable installation
|
|
|
|
# This script will download the docker images and export them to the folder "images".
|
|
# When building the .iso image the preloaded docker images will be exported to the .iso which
|
|
# may be useful if you need to install more than one machine.
|
|
|
|
# Got root?
|
|
myWHOAMI=$(whoami)
|
|
if [ "$myWHOAMI" != "root" ]
|
|
then
|
|
echo "Please run as root ..."
|
|
exit
|
|
fi
|
|
|
|
if [ -z $1 ]
|
|
then
|
|
echo "Please view the script for more details!"
|
|
exit
|
|
fi
|
|
if [ $1 == "now" ]
|
|
then
|
|
for name in $(cat installer/data/full_images.conf)
|
|
do
|
|
docker pull dtagdevsec/$name:latest1603
|
|
done
|
|
mkdir images
|
|
chmod 777 images
|
|
for name in $(cat installer/data/full_images.conf)
|
|
do
|
|
echo "Now exporting dtagdevsec/$name:latest1603"
|
|
docker save -o images/$name:latest1603.img dtagdevsec/$name:latest1603
|
|
done
|
|
chmod 777 images/*.img
|
|
fi
|