mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
only add custom docker net to pillar
This commit is contained in:
@@ -1094,32 +1094,6 @@ disable_ipv6() {
|
|||||||
} >> /etc/sysctl.conf
|
} >> /etc/sysctl.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
docker_registry() {
|
|
||||||
|
|
||||||
title "Setting up Docker Registry"
|
|
||||||
logCmd "mkdir -p /etc/docker"
|
|
||||||
# This will get applied so docker can attempt to start
|
|
||||||
if [ -z "$DOCKERNET" ]; then
|
|
||||||
DOCKERNET=172.17.1.0
|
|
||||||
fi
|
|
||||||
# Make the host use the manager docker registry
|
|
||||||
DNETBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
|
|
||||||
if [ -n "$TURBO" ]; then local proxy="$TURBO"; else local proxy="https://$MSRV"; fi
|
|
||||||
printf '%s\n'\
|
|
||||||
"{"\
|
|
||||||
" \"registry-mirrors\": [ \"$proxy:5000\" ],"\
|
|
||||||
" \"bip\": \"$DNETBIP\","\
|
|
||||||
" \"default-address-pools\": ["\
|
|
||||||
" {"\
|
|
||||||
" \"base\" : \"$DOCKERNET/24\","\
|
|
||||||
" \"size\" : 24"\
|
|
||||||
" }"\
|
|
||||||
" ]"\
|
|
||||||
"}" > /etc/docker/daemon.json
|
|
||||||
info "Docker Registry Setup - Complete"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
docker_seed_update() {
|
docker_seed_update() {
|
||||||
local name=$1
|
local name=$1
|
||||||
local percent_delta=1
|
local percent_delta=1
|
||||||
@@ -1482,13 +1456,6 @@ create_global() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DOCKERNET" ]; then
|
|
||||||
DOCKERNET=172.17.1.0
|
|
||||||
DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
|
|
||||||
else
|
|
||||||
DOCKERBIP=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')/24
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$global_pillar_file" ]; then
|
if [ -f "$global_pillar_file" ]; then
|
||||||
rm $global_pillar_file
|
rm $global_pillar_file
|
||||||
fi
|
fi
|
||||||
@@ -1549,10 +1516,15 @@ soctopus_pillar() {
|
|||||||
docker_pillar() {
|
docker_pillar() {
|
||||||
title "Create the docker pillar file"
|
title "Create the docker pillar file"
|
||||||
touch $adv_docker_pillar_file
|
touch $adv_docker_pillar_file
|
||||||
|
touch $docker_pillar_file
|
||||||
|
|
||||||
|
if [ ! -z "$DOCKERNET" ]; then
|
||||||
|
DOCKERGATEWAY=$(echo $DOCKERNET | awk -F'.' '{print $1,$2,$3,1}' OFS='.')
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"docker:"\
|
"docker:"\
|
||||||
" range: '$DOCKERNET/24'"\
|
" range: '$DOCKERNET/24'"\
|
||||||
" bip: '$DOCKERBIP'" > $docker_pillar_file
|
" gateway: '$DOCKERGATEWAY'" > $docker_pillar_file
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
redis_pillar() {
|
redis_pillar() {
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ whiptail_end_settings() {
|
|||||||
|
|
||||||
[[ -n $WEBUSER ]] && __append_end_msg "Web User: $WEBUSER"
|
[[ -n $WEBUSER ]] && __append_end_msg "Web User: $WEBUSER"
|
||||||
|
|
||||||
[[ -n $DOCKERNET ]] && __append_end_msg "Docker network: $DOCKERNET"
|
[[ -n $DOCKERNET ]] && __append_end_msg "Docker network: $DOCKERNET/24"
|
||||||
if [[ ${#ntp_servers[@]} -gt 0 ]]; then
|
if [[ ${#ntp_servers[@]} -gt 0 ]]; then
|
||||||
__append_end_msg "NTP Servers:"
|
__append_end_msg "NTP Servers:"
|
||||||
for server in "${ntp_servers[@]}"; do
|
for server in "${ntp_servers[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user