Skip to content

Commit

Permalink
ubuntu bootstrapping: modify docker cfg instead of full rewrite. (#395)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greyerof authored Feb 8, 2024
1 parent b2a501a commit c23a893
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions config/vagrant/scripts/bootstrap-docker-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/usr/bin/env bash

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

# restart docker
sudo systemctl restart docker
Expand Down

0 comments on commit c23a893

Please sign in to comment.