blob: 3bcddf684c6c26d7ff93aacd7a0c9ad94fccca18 [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
14while [ $# -gt 0 ]; do
15 echo "DOCKER_OPTS=\"\$DOCKER_OPTS --insecure-registry $1\"" >> $OUT
16 shift
17done
18
19sudo cp $OUT /etc/default/docker
20rm $OUT
21
22sudo service docker restart