Commit 24688dc
committed
Fix recreation of aliases/network config in Docker container attach
Previously we didn't touch 'NetworkMode' which meant that it retained
the name of the main network the container was using, and that meant
that it reconnected to that automatically, ignoring the subsequent
network connection call we made with the full settings.
We now connect all attached containers to 'none' initially, and then
manually reconnect them to the original networks with their full
settings, to preserve everything (especially aliases).
This change also ensures we wait for network setup to be complete, so
the container starts with this change entirely in place.1 parent 6fe5964 commit 24688dc
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | 194 | | |
196 | 195 | | |
197 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
271 | | - | |
| 279 | + | |
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
| |||
0 commit comments