Gary Wu | d83efff | 2018-01-09 16:47:30 -0800 | [diff] [blame] | 1 | #!/bin/bash |
Gary Wu | 2845d14 | 2018-08-01 12:02:37 -0700 | [diff] [blame^] | 2 | sed -i '/^ #!\/bin\/bash/a\ |
Gary Wu | 5332336 | 2018-01-09 22:37:27 -0800 | [diff] [blame] | 3 | # sleep up to 3 minutes to avoid disk contention\ |
| 4 | sleep $((RANDOM / 200))\ |
Gary Wu | 5e8e812 | 2018-01-09 19:54:45 -0800 | [diff] [blame] | 5 | mkdir -p /etc/docker\ |
| 6 | cat > /etc/docker/daemon.json <<EOF\ |
| 7 | {\ |
gwu | 10db462 | 2018-07-17 22:11:39 -0700 | [diff] [blame] | 8 | "insecure-registries" : ["192.168.2.20:5000"]\ |
Gary Wu | 5e8e812 | 2018-01-09 19:54:45 -0800 | [diff] [blame] | 9 | }\ |
| 10 | EOF\ |
Gary Wu | d83efff | 2018-01-09 16:47:30 -0800 | [diff] [blame] | 11 | cat > /etc/apt/apt.conf.d/30proxy<<EOF\ |
Gary Wu | 65759ac | 2018-01-15 14:23:37 -0800 | [diff] [blame] | 12 | Acquire::http { Proxy "http://192.168.1.51:3142"; };\ |
Gary Wu | d83efff | 2018-01-09 16:47:30 -0800 | [diff] [blame] | 13 | Acquire::https::Proxy "DIRECT";\ |
| 14 | EOF\ |
| 15 | apt-get -y update' $1 |