docker-ubuntumirror/mirror/syncubuntu.sh

27 lines
608 B
Bash
Executable File

#!/bin/bash
set -x
THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)"
DST="/var/mirror"
mkdir -p "$DST/ubuntu"
export GNUPGHOME="/etc/debmirror/ubuntu"
debmirror \
-a ${MIRROR_ARCHITECTURES:-amd64} \
--no-source \
-s ${MIRROR_CATEGORIES:-main,universe} \
-h ${UBUNTU_MIRROR_SOURCE:-archive.ubuntu.com} \
-d trusty,trusty-updates,trusty-security,trusty-backports \
-d xenial,xenial-updates,xenial-security,xenial-backports \
--ignore-small-errors \
-r /ubuntu \
--progress \
--method=http \
$DST/ubuntu
echo "http://172.17.0.1/ubuntu/" > $DST/ubuntu/mirrors.txt
chmod -R a+rX $DST/ubuntu