Skip to content

tetsuyainfra/docker-image-acng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-image-acng

Docker Docker Image Version

This is Apt-Cacher NG

How to run

# just run on local-machine
$ make build
$ docker run --rm -p 3142:3142 acng:latest
# same command
# $ make just_run

# then
$ http_proxy=localhost:3142 curl curl http://deb.debian.org/debian/dists/trixie/InRelease -Iv
HTTP/1.1 200 OK
Content-Type: octet/stream
Last-Modified: Sat, 06 Sep 2025 09:51:38 GMT
Content-Length: 140465
X-Original-Source: http://ftp.debian.org/debian/dists/trixie/InRelease
Date: Thu, 06 Nov 2025 12:52:03 GMT
Server: Debian Apt-Cacher NG/3.7.5

This repositories acng is including crond(busybox). If you want to disable cron, you pass '-e USE_CRON=FALSE' to docker run.

$ docker run --rm -p 3142:3142 \
    -e USE_CRON=FALSE \
    acng:latest

Repository Configuration

By default, APT-Cacher NG includes Debian, Ubuntu, Kali, Arch, and other official repositories, but third-party repositories are not included. You can define additional repositories using the ADD_REPOS variable. ADD_REPOS must be specified as a JSON string with the following structure. For detailed information on the meaning of mergeUrls and targetUrls, please refer to the official documentation.

Note: If a repository requires an HTTPS connection, make sure to set the ALLOW_USE_PORTS variable appropriately.

# this exmaple use yq ( yq is yaml version's jq )
$ ADD_REPOS=$(yq --compact-output . test-vars.yml )
$ docker run --rm -p 3142:3142 \
    -D ALLOW_USER_PORTS="80 443" \ # BE CAREFUL
    -D ADD_REPOS="${ADD_REPOS}" \
    acng:latest

example ADD_REPOS ( expanded )

[
    {
        name: "docker",
        mergeUrls: [
            "download.docker.com/linux"
        ],
        targetUrls: [
            "https://download.docker.com/linux"
        ]
    },
    {
        "name": "pg",
        "MergingURLs": [
            "apt.postgresql.org/pub/repos/apt",
            "yum.postgresql.org/pub/repos/apt",
            "ftp.postgresql.org/pub/repos/apt",
            "download.postgresql.org/pub/repos/apt"
        ],
        "TargetURLs": [
            "download.postgresql.org/pub/repos/apt"
        ],
        "OptionalFlags": ""
    }
]

Test

make test

environment

VAR default memo
USE_CRON TRUE cleanup for cache / log
CRON_SCHEDULE * 4 * * *
TOP_MIRROR_DEBIAN ex: http://mirrors.xtom.jp/debian/
TOP_MIRROR_UBUNTU ex: http://mirrors.xtom.jp/ubuntu/
ALLOW_USER_PORTS 80 SEE: https://www.unix-ag.uni-kl.de/~bloch/acng/html/howtos.html#ssluse
ADD_REPOS SEE: https://www.unix-ag.uni-kl.de/~bloch/acng/html/config-serv.html#config-serv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published