{"id":18298163,"url":"https://github.com/modem7/docker-apt-cacher-ng","last_synced_at":"2026-02-12T17:34:57.913Z","repository":{"id":59859066,"uuid":"539633732","full_name":"modem7/docker-apt-cacher-ng","owner":"modem7","description":"Dockerised apt-cacher-ng, local package cache for multiple distros","archived":false,"fork":false,"pushed_at":"2025-01-04T00:49:22.000Z","size":38,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T06:40:20.213Z","etag":null,"topics":["apt-cacher-ng","docker"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modem7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-21T18:34:50.000Z","updated_at":"2025-01-04T00:49:07.000Z","dependencies_parsed_at":"2023-11-30T17:36:42.822Z","dependency_job_id":"767b4327-5f94-422e-b04b-fdb52d69d72d","html_url":"https://github.com/modem7/docker-apt-cacher-ng","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/modem7/docker-apt-cacher-ng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modem7%2Fdocker-apt-cacher-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modem7%2Fdocker-apt-cacher-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modem7%2Fdocker-apt-cacher-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modem7%2Fdocker-apt-cacher-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modem7","download_url":"https://codeload.github.com/modem7/docker-apt-cacher-ng/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modem7%2Fdocker-apt-cacher-ng/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29374120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt-cacher-ng","docker"],"created_at":"2024-11-05T15:05:22.902Z","updated_at":"2026-02-12T17:34:57.893Z","avatar_url":"https://github.com/modem7.png","language":"Dockerfile","funding_links":["https://www.buymeacoffee.com/modem7"],"categories":[],"sub_categories":[],"readme":"# modem7/docker-apt-cacher-ng\n[![Docker Pulls](https://img.shields.io/docker/pulls/modem7/apt-cacher-ng)](https://hub.docker.com/r/modem7/apt-cacher-ng)\n[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/modem7/apt-cacher-ng/latest)](https://hub.docker.com/r/modem7/apt-cacher-ng)\n[![Build Status](https://drone.modem7.com/api/badges/modem7/docker-apt-cacher-ng/status.svg)](https://drone.modem7.com/modem7/docker-apt-cacher-ng)\n[![GitHub last commit](https://img.shields.io/github/last-commit/modem7/docker-apt-cacher-ng)](https://github.com/modem7/docker-apt-cacher-ng)\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/modem7)\n\nDocker image for apt-cacher-ng.\n\n---\n\nApt-Cache-ng is a caching proxy. Specialized for package files from Linux distributors, primarily for Debian (and Debian based) distributions but not limited to those.\n\nA caching proxy have the following benefits:\n\n- Lower latency\n- Reduce WAN traffic\n- Higher speed for cached contents\n\n---\n\nTo pull this image:\n`docker pull modem7/apt-cacher-ng`\n\n## Image Tags\n\n### Multi-arch Tags\n\nThe `latest` tag has multi-arch support for `amd64`, and `arm64` and will automatically pull the correct tag based on your system's architecture.\n\n## Environment Variables\n| Variable | Possible Values | Description |\n| :----: | --- | --- |\n| PRECACHE | enabled or yes | Enables the precache for Debian, Ubuntu, Debian Security, and Docker |\n\n## Example usage\n\n```bash\ndocker run -d \\\n  --name apt-cacher-ng \\\n  -p 3142:3142 \\\n  -e TZ=\"Europe/London\" \\\n  -v /data/apt-cacher-ng:/var/cache/apt-cacher-ng \\\n  modem7/apt-cacher-ng\n```\n\n## Docker Compose example\n```yaml\n ################\n #APT-Cacher-NG##\n ################\n\n  apt-cacher-ng:\n    container_name: APT-Cacher-NG\n    hostname: APT-Cacher-NG\n    restart: always\n    image: modem7/apt-cacher-ng\n    networks:\n      pihole:\n        ipv4_address: '172.22.0.111'\n    ports:\n    - \"3142:3142\"\n    volumes:\n      - apt-cacher-ng:/var/cache/apt-cacher-ng\n\nvolumes:\n  apt-cacher-ng:\n```\n\nThis image runs `apt-cacher-ng`, `cron`, and `rsyslogd` to ensure that apt-cacher-ng functions properly with scheduled jobs and appropriate logging.\n\nIn order to configure a host to make use of apt-cacher-ng on a box, you should create a file on the host `/etc/apt/apt.conf` with the following lines:\n\n```bash\nAcquire::http::Proxy \"http://\u003cdocker-host\u003e:3142\";\n```\n\nOr a one liner for Debian/Ubuntu hosts:\n```bash\necho \"Acquire::http::Proxy \\\"http://\u003cdocker-host\u003e:3142\\\";\" | sudo tee /etc/apt/apt.conf.d/00proxy\n```\n\nYou can also bypass the apt caching server on a per client basis by using the following syntax in your `/etc/apt/apt.conf` file:\n\n```bash\nAcquire::HTTP::Proxy::\u003crepo-url\u003e \"DIRECT\";\n```\n\nFor example:\n\n```bash\nAcquire::HTTP::Proxy::get.docker.com \"DIRECT\";\nAcquire::HTTP::Proxy::download.virtualbox.org \"DIRECT\";\n```\n\nNote:  The above assumes that you are mapping port 3142 on the docker host and 3142 is accessible from all machines.\n\nYou can also update the /etc/apt-cacher-ng/acng.conf and add one or more `PassThroughPattern` lines to force clients to bypass a repository:\n\n```bash\nPassThroughPattern: get\\.docker\\.com\nPassThroughPattern: download\\.virtualbox\\.org\n```\n\n## Getting https://download.docker.com to cache\nIf you want to cache your Docker.com downloads, you'll need to change the repo on your client from https to http.\n\nFor example, if you're following the [Ubuntu install](https://docs.docker.com/engine/install/ubuntu/) instructions, you'll need to do change the following:\n\nInstead of\n```bash\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \\\n  $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n```\n\nChange to:\n```bash\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] http://download.docker.com/linux/ubuntu \\\n  $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\n```\n\n---\n\nBased on the work from [mbentley](https://github.com/mbentley/docker-apt-cacher-ng) and [sameersbn](https://github.com/sameersbn/docker-apt-cacher-ng).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodem7%2Fdocker-apt-cacher-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodem7%2Fdocker-apt-cacher-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodem7%2Fdocker-apt-cacher-ng/lists"}