-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker_setup.sh
More file actions
executable file
·27 lines (24 loc) · 875 Bytes
/
Copy pathdocker_setup.sh
File metadata and controls
executable file
·27 lines (24 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
echo "################################################"
echo "Setting Up Docker..."
echo "################################################"
brctl addbr cfy0
ip addr add 172.20.0.1/24 dev cfy0
ip link set dev cfy0 up
echo "################################################"
echo "Playing around with SystemD for Ubuntu/Docker Upgrade..."
echo "################################################"
sed -i 's/ExecStart.*/ExecStart\=\/usr\/bin\/dockerd/g' /lib/systemd/system/docker.service
cat > /etc/docker/daemon.json <<EOL
{
"bridge": "cfy0",
"dns": ["8.8.8.8", "8.8.8.4"],
"hosts": ["unix:///var/run/docker.sock", "tcp://172.20.0.1:2375"],
"mtu": 1420
}
EOL
systemctl daemon-reload
systemctl restart docker.service
echo "################################################"
echo "Done"
echo "################################################"