How to upgrade docker for azure when change the subnet of the original template?

I’ve installed docker for azure 1.07.0 CE and I’ve changed the sub net for 12.0.0.0 which is suitable with my infrastructure. However, when I want to upgrade to 1.07.01 CE with the instruction shown in https://docs.docker.com/docker-for-azure/upgrade/#upgrading. It is failed with writing the new networking configuration error shown in the azure portal console.

The question is how can I upgrade the docker for azure with custom network configuration?

Thank you so much.

@torsakch … 1.07 sounds like a pretty old version from a period of time when Docker4Azure was still in Beta. Can you confirm the version? When did you deploy it?

Sorry for that. The version is 17.06.0 CE.

@torsakch Can you explain a bit the specific network customizations you performed? Wanted to see if we can potentially expose those as parameters in some form so that upgrades can go through smoothly.

@ddebroy I’ve changed the “subnetPrefix” from “10.0.0.0/8” to “14.0.0.0/8” when I created the swarm from the template. Thank you so much

Do you have any work around for now? Thank you

There isn’t a trivial workaround I can think of at the moment once you have customized the template. You may try to modify the upgrade container docker4x/upgrade-azure: have the entry-point script upgrade.sh that sets the target template to upgrade to to point to a template that has your customizations and points to the Docker VHD that you want to upgrade to.