docker-ubuntumirror/mirror/syncubuntu.sh

29 lines
622 B
Bash
Raw Normal View History

2016-04-08 20:41:48 +00:00
#!/bin/bash
set -x
THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)"
DST="/var/mirror"
echo "http://172.17.0.1/ubuntu/" > $DST/mirrors.txt
chmod a+r $DST/mirrors.txt
2016-04-09 14:18:35 +00:00
mkdir -p "$DST/ubuntu"
2016-04-08 21:24:53 +00:00
export GNUPGHOME="/etc/debmirror/ubuntu"
2016-04-08 20:41:48 +00:00
debmirror \
2016-04-09 13:11:56 +00:00
-a ${MIRROR_ARCHITECTURES:-amd64} \
2016-04-08 20:41:48 +00:00
--no-source \
2016-04-09 13:11:56 +00:00
-s ${MIRROR_CATEGORIES:-main,universe} \
2016-04-08 21:08:04 +00:00
-h ${UBUNTU_MIRROR_SOURCE:-archive.ubuntu.com} \
2016-04-08 20:41:48 +00:00
-d trusty,trusty-updates,trusty-security,trusty-backports \
-d xenial,xenial-updates,xenial-security,xenial-backports \
2016-04-11 00:54:41 +00:00
--ignore-small-errors \
2016-04-08 20:41:48 +00:00
-r /ubuntu \
--progress \
--method=http \
$DST/ubuntu
2016-04-11 00:33:48 +00:00
chmod -R a+rX $DST