blob: 18763698c505296a00865c19ed848763bca3846a [file] [log] [blame]
David K. Bainbridge119a3b02016-06-16 18:10:30 -07001#!/bin/bash
2
3PROG=$(basename $0)
4
5HELP=$(echo "$*" | grep "\-h" | wc -w)
6
7if [ $HELP -ne 0 ]; then
8 echo "usage: $PROG <remote-registry>..."
9 exit 1
10fi
11
12OUT=$(tempfile)
13head -1 /etc/default/docker >> $OUT
David K. Bainbridge59241a22016-06-17 14:46:42 -070014echo "" >> $OUT
David K. Bainbridge119a3b02016-06-16 18:10:30 -070015while [ $# -gt 0 ]; do
16 echo "DOCKER_OPTS=\"\$DOCKER_OPTS --insecure-registry $1\"" >> $OUT
17 shift
18done
19
20sudo cp $OUT /etc/default/docker
21rm $OUT
22
23sudo service docker restart