docker-ubuntumirror/mirror/syncubuntu.sh
Jeffrey Paul 645a3f9121
Some checks failed
continuous-integration/drone/push Build is failing
prepping for release in caprover
2020-02-08 05:29:08 -08:00

28 lines
625 B
Bash
Executable File

#!/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
mkdir -p "$DST/ubuntu"
export GNUPGHOME="/etc/debmirror/ubuntu"
debmirror \
-a ${MIRROR_ARCHITECTURES:-amd64} \
--no-source \
-s ${MIRROR_CATEGORIES:-main,universe,multiverse,restricted} \
-h ${UBUNTU_MIRROR_SOURCE:-archive.ubuntu.com} \
-d ${UBUNTU_MIRROR_PROJECTS:-focal,focal-updates,focal-security,focal-backports} \
--ignore-small-errors \
-r /ubuntu \
--getcontents \
--progress \
--method=http \
$DST/ubuntu
chmod -R a+rX $DST