blob: b2d5d1f010832f7aac774bee37f23ad1de7a31f5 [file] [log] [blame]
Gary Wud83efff2018-01-09 16:47:30 -08001#!/bin/bash
Gary Wu2845d142018-08-01 12:02:37 -07002sed -i '/^ #!\/bin\/bash/a\
Gary Wu53323362018-01-09 22:37:27 -08003 # sleep up to 3 minutes to avoid disk contention\
4 sleep $((RANDOM / 200))\
Gary Wu5e8e8122018-01-09 19:54:45 -08005 mkdir -p /etc/docker\
6 cat > /etc/docker/daemon.json <<EOF\
7 {\
gwu10db4622018-07-17 22:11:39 -07008 "insecure-registries" : ["192.168.2.20:5000"]\
Gary Wu5e8e8122018-01-09 19:54:45 -08009 }\
10 EOF\
Gary Wud83efff2018-01-09 16:47:30 -080011 cat > /etc/apt/apt.conf.d/30proxy<<EOF\
Gary Wu65759ac2018-01-15 14:23:37 -080012 Acquire::http { Proxy "http://192.168.1.51:3142"; };\
Gary Wud83efff2018-01-09 16:47:30 -080013 Acquire::https::Proxy "DIRECT";\
14 EOF\
15 apt-get -y update' $1