first docker version
This commit is contained in:
commit
fb0c4394cd
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# 基础镜像
|
||||||
|
FROM debian
|
||||||
|
|
||||||
|
# 安装 debmirror 工具
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y debmirror
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /mirror
|
||||||
|
|
||||||
|
# 复制 debmirror 配置文件
|
||||||
|
COPY debmirror.conf /etc/debmirror.conf
|
||||||
|
|
||||||
|
# 执行 debmirror 命令
|
||||||
|
CMD ["debmirror", "/mirror"]
|
||||||
|
|
17
README.md
Normal file
17
README.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# mirror Debian arm64 main pool to local
|
||||||
|
|
||||||
|
## Build
|
||||||
|
~~~bash
|
||||||
|
docker build -t arm64-debmirror:1.0 .
|
||||||
|
~~~
|
||||||
|
|
||||||
|
## Before RUN
|
||||||
|
You need a large space for store all pool in local disk.
|
||||||
|
Make sure that you have freespace above 200GB.
|
||||||
|
For Example empty DIR /data/debian/mirror is on a SSD with 500GB freespace.
|
||||||
|
|
||||||
|
## RUN
|
||||||
|
~~~bash
|
||||||
|
export MIRROR_DATA=/data/debian/mirror
|
||||||
|
sudo docker run -it -v ${MIRROR_DATA}:/mirror arm64-debmirror:1.0
|
||||||
|
~~~
|
79
debmirror.conf
Normal file
79
debmirror.conf
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# Default config for debmirror
|
||||||
|
|
||||||
|
# The config file is a perl script so take care to follow perl syntax.
|
||||||
|
# Any setting in /etc/debmirror.conf overrides these defaults and
|
||||||
|
# ~/.debmirror.conf overrides those again. Take only what you need.
|
||||||
|
#
|
||||||
|
# The syntax is the same as on the command line and variable names
|
||||||
|
# loosely match option names. If you don't recognize something here
|
||||||
|
# then just stick to the command line.
|
||||||
|
#
|
||||||
|
# Options specified on the command line override settings in the config
|
||||||
|
# files.
|
||||||
|
|
||||||
|
# Location of the local mirror (use with care)
|
||||||
|
# $mirrordir="/path/to/mirrordir"
|
||||||
|
|
||||||
|
# Output options
|
||||||
|
$verbose=1;
|
||||||
|
$progress=1;
|
||||||
|
$debug=0;
|
||||||
|
|
||||||
|
# Download options
|
||||||
|
$host="mirrors.huaweicloud.com";
|
||||||
|
$user="";
|
||||||
|
$passwd="";
|
||||||
|
$remoteroot="debian";
|
||||||
|
$download_method="https";
|
||||||
|
@dists="bullseye";
|
||||||
|
@sections="main,non-free,non-free-firmware";
|
||||||
|
@arches="arm64";
|
||||||
|
# @ignores="";
|
||||||
|
# @excludes="";
|
||||||
|
# @includes="";
|
||||||
|
# @excludes_deb_section="";
|
||||||
|
# @limit_priority="";
|
||||||
|
$omit_suite_symlinks=0;
|
||||||
|
$skippackages=0;
|
||||||
|
# @rsync_extra="doc,tools";
|
||||||
|
$i18n=1;
|
||||||
|
$getcontents=0;
|
||||||
|
$do_source=1;
|
||||||
|
$max_batch=0;
|
||||||
|
|
||||||
|
# @di_dists="dists";
|
||||||
|
# @di_archs="arches";
|
||||||
|
|
||||||
|
# Save mirror state between runs; value sets validity of cache in days
|
||||||
|
$state_cache_days=0;
|
||||||
|
|
||||||
|
# Security/Sanity options
|
||||||
|
$ignore_release_gpg=1;
|
||||||
|
$ignore_release=0;
|
||||||
|
$check_md5sums=0;
|
||||||
|
$ignore_small_errors=0;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
$cleanup=0;
|
||||||
|
$post_cleanup=1;
|
||||||
|
|
||||||
|
# Locking options
|
||||||
|
$timeout=300;
|
||||||
|
|
||||||
|
# Rsync options
|
||||||
|
$rsync_batch=200;
|
||||||
|
$rsync_options="-aIL --partial";
|
||||||
|
|
||||||
|
# FTP/HTTP options
|
||||||
|
$passive=0;
|
||||||
|
# $proxy="http://proxy:port/";
|
||||||
|
|
||||||
|
# Dry run
|
||||||
|
$dry_run=0;
|
||||||
|
|
||||||
|
# Don't keep diff files but use them
|
||||||
|
$diff_mode="use";
|
||||||
|
|
||||||
|
# The config file must return true or perl complains.
|
||||||
|
# Always copy this.
|
||||||
|
1;
|
Loading…
Reference in New Issue
Block a user