Giter Site home page Giter Site logo

dockerfile-apt-mirror's Introduction

apt-mirror Docker Image

Tag Dockerfile Image Layers
bionic Dockerfile
xenial Dockerfile

Usage

docker run -v $PWD/apt-mirror:/var/spool/apt-mirror helphi/apt-mirror:xenial
docker run -v $PWD/apt-mirror:/usr/local/apache2/htdocs -p80:80 httpd:2.4.29-alpine

Change Schedule

mkdir cron.d

echo "0 3 * * * root /usr/bin/apt-mirror > /var/spool/apt-mirror/cron.log" > cron.d/apt-mirror
chown root:root cron.d/apt-mirror
chmod 644 cron.d/apt-mirror

docker run \
  -v $PWD/apt-mirror:/var/spool/apt-mirror \
  -v $PWD/cron.d:/etc/cron.d \
  helphi/apt-mirror:xenial

Change Mirror Source

mkdir apt

cat << EOF > apt/mirror.list
############# config ##################
#
# set base_path    /var/spool/apt-mirror
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

deb http://cn.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse

clean http://cn.archive.ubuntu.com/ubuntu
EOF

docker run \
  -v $PWD/apt-mirror:/var/spool/apt-mirror \
  -v $PWD/apt:/etc/apt \
  helphi/apt-mirror:xenial

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.