8 lines
276 B
Plaintext
8 lines
276 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
for container in $(docker ps -a --format=" {{ .ID }}"); do
|
||
|
docker cp -L /etc/resolv.conf ${container}:/_resolv.conf
|
||
|
docker exec -t ${container} bash -c "cat /_resolv.conf > /etc/resolv.conf"
|
||
|
docker exec -t ${container} bash -c "rm /_resolv.conf"
|
||
|
done
|