From 1181135165c86e4b7db658026ee1d5e319c4a75b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 17 Oct 2019 12:14:25 +0200 Subject: [PATCH] Changing the network address-range of Docker --- Update-recommendations-and-troubleshooting.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Update-recommendations-and-troubleshooting.md b/Update-recommendations-and-troubleshooting.md index 385f6e9..8ac4bae 100644 --- a/Update-recommendations-and-troubleshooting.md +++ b/Update-recommendations-and-troubleshooting.md @@ -25,6 +25,39 @@ chown -R 33:33 /var/lib/egroupware/default 5. log into the new EGroupware using the generated ***sysop*** user and go to ***Administration >> Database backup and restore*** and restore the last backup you rsynced to the new server 6. you can repeat steps 3. to 5. multiple times, until you are ready to use the new system productively +# Changing the network address-range of Docker + +Docker and docker-compose creates (internal) networks by default in the 172.[17-31].0.0 range. +If you use this range already for existing networks you need to change the default BEFORE installing EGroupware, as you wont be able to reach EGroupware from 172.17+ networks! + +To move all Docker IP addresses / networks eg. to 172.22.0.0/16 you need to do the following: +Create the file /etc/docker/daemon.json with the following content: +``` +{ + "default-address-pools": + [ + {"base":"172.22.0.0/16","size":24} + ] +} +``` +Then you need to restart the Docker daemon, if you already installed it: ```systemctl restart docker``` + +In case you already installed EGroupware you need to delete all containers and networks, as the above only works for newly created networks NOT for the existing ones: +``` +for dir in /etc/egroupware-* +do + cd $dir + docker-compose stop + docker-compose rm -f +done +docker system prune +for dir in /etc/egroupware-* +do + cd $dir + docker-compose up -d +done +``` + # Trouble-shooting a not working installation after the update What to do if you can not access EGroupware after the update: