Skip to content

Commit 6ebec1d

Browse files
James HealyDrJosh9000
andcommitted
Implement PR suggestions
Co-authored-by: Josh Deprez <[email protected]>
1 parent a50ee92 commit 6ebec1d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packer/linux/conf/bin/bk-configure-docker.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fi
7171

7272
# One day we can auto-detect whether the instance is v4-only, dualstack or v6-only. To avoid a
7373
# breaking change though, we'll default to ipv4 only and users can opt into v6 support. The elastic
74-
# stack has always defaulted to v4-only so this ensuring no breaking behaviour.
74+
# stack has always defaulted to v4-only so this ensures no breaking behaviour.
7575
# v6-only is currently not an option because docker doesn't support it, but maybe one day....
7676
echo Customising docker network configuration...
7777

@@ -86,12 +86,9 @@ elif [[ "${DOCKER_NETWORKING_PROTOCOL}" == "dualstack" ]]; then
8686
# Using v6 inside containers requires DOCKER_EXPERIMENTAL. This is configured
8787
# further down
8888
DOCKER_EXPERIMENTAL=true
89-
cat <<<"$(jq '.ipv6=true' /etc/docker/daemon.json)" >/etc/docker/daemon.json
90-
cat <<<"$(jq '."fixed-cidr-v6"="2001:db8:1::/64"' /etc/docker/daemon.json)" >/etc/docker/daemon.json
91-
cat <<<"$(jq '.ip6tables=true' /etc/docker/daemon.json)" >/etc/docker/daemon.json
9289
cat <<<"$(
9390
jq \
94-
'."default-address-pools"=[{"base":"172.17.0.0/12","size":20},{"base":"192.168.0.0/16","size":24},{"base":"2001:db8:2::/104","size":112}]' \
91+
'.ipv6=true | ."fixed-cidr-v6"="2001:db8:1::/64" | .ip6tables=true | ."default-address-pools"=[{"base":"172.17.0.0/12","size":20},{"base":"192.168.0.0/16","size":24},{"base":"2001:db8:2::/104","size":112}]' \
9592
/etc/docker/daemon.json
9693
)" >/etc/docker/daemon.json
9794
else

0 commit comments

Comments
 (0)