Using Docker to construct your APT(Advanced Packaging Tools) mirror HTTP server
Go to file
kongkrit 917eb77cb6
changed repo name to apt-mirror-apache2
2020-01-04 11:07:26 +07:00
Dockerfile added NTHREADS, PUID, PGID support 2020-01-04 10:45:14 +07:00
README.md changed repo name to apt-mirror-apache2 2020-01-04 11:07:26 +07:00
setup.sh added NTHREADS, PUID, PGID support 2020-01-04 10:45:14 +07:00

README.md

apt-mirror-http-apache2

Using Docker to construct your APT(Advanced Packaging Tools) mirror HTTP server.

Usage

Basic command:

docker run -d \
           -v /path/data:/var/www/html/ \
           -p 8080:80 kongkrit/apt-mirror-http-server
  • -v /path/data: the path which you want to store data

More options with docker command

  • -e MIRROR_URL=url: to replace default URL (http://archive.ubuntu.com/ubuntu) - See Ubuntu Mirrors
  • -e TIMEOUT=timeout-value: to set the resync period, default is 12 hours. See the TIMEOUT format description
  • -e NTHREADS=10: number of wget threads to use to pull from MIRROR_URL - default to 10
  • -e PUID=userid: set to a userid that can access the mounted volume (see note below)
  • -e PGID=groupid: set to a groupid that can access the mounted volume (see note below)

More on PUID and PGID from linuxserver.io

When using volumes (-v flags), permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000. To find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

You only need to set the PUID and PGID variables if you are mounting the /var/www/html folder

Changelog

  • 2020-01-04

    • support PUID, PGID, and NTHREADS
  • 2020-01-01

    • updated ubuntu to 18.04 LTS
  • 2017-07-27: version 0.1.2

    • Fix the container started twice: "httpd (pid 13) already running"
  • 2017-04-28: version 0.1.1

    • Fix http server doesn't start after the container restarted
  • 2017-04-27: version 0.1