Skip to content

Commit c23a893

Browse files
authored
ubuntu bootstrapping: modify docker cfg instead of full rewrite. (#395)
Adding ipv6 support for docker bootstrapping on ubuntu was rewriting the full docker daemon.json config file. This change just adds (or overwrites) the required fields to add ipv6 support. This will allow switching docker storage to /mnt in our github ci workflows right at the beginning on each job, instead of doing it right after this script had rewritten.
1 parent b2a501a commit c23a893

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

config/vagrant/scripts/bootstrap-docker-ubuntu.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/usr/bin/env bash
22

3-
# update docker config
4-
sudo bash -c 'cat <<- EOF > /etc/docker/daemon.json
5-
{
6-
"ipv6": true,
7-
"fixed-cidr-v6": "2001:db8:1::/64"
8-
}
9-
EOF'
3+
# update docker config to include ipv6 support
4+
jq '. +={"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}' /etc/docker/daemon.json > /tmp/new-docker-daemon.json
5+
sudo cp /tmp/new-docker-daemon.json /etc/docker/daemon.json
6+
rm /tmp/new-docker-daemon.json
107

118
# restart docker
129
sudo systemctl restart docker

0 commit comments

Comments
 (0)