Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vektorcloud/apt-cacher

Simple apt package cache for use with Docker
https://github.com/vektorcloud/apt-cacher

Last synced: about 1 month ago
JSON representation

Simple apt package cache for use with Docker

Awesome Lists containing this project

README

        

# apt-cacher

[![circleci][circleci]](https://circleci.com/gh/vektorcloud/apt-cacher)

Apt-cacher is a simple apt package cache for use with Docker, but suitable in any case where an entire package mirror may be overkill.

## Quickstart

```
docker run -d --name=apt-cacher quay.io/vektorcloud/apt-cacher:latest
```

After apt-cacher is up, start any following containers linked to the cache:

* Ubuntu:
```
docker run -ti --link apt-cacher:security.ubuntu.com --link apt-cacher:archive.ubuntu.com ubuntu:latest /bin/bash
```

* Debian:
```
docker run -ti --link apt-cacher:security.debian.org --link apt-cacher:ftp.debian.org debian:latest /bin/bash
```

To alternatively avoid having to link every running container, publish port 80 to the host:
```
docker run -d -p 80:80 --name=apt-cacher quay.io/vektorcloud/apt-cacher:latest
```
and add an /etc/hosts entry on the host pointing to localhost or the address of the interface you have docker bound to:
```
127.0.0.1 ftp.debian.org
127.0.0.1 security.debian.org
127.0.0.1 archive.ubuntu.com
127.0.0.1 security.ubuntu.com
```

[circleci]: https://img.shields.io/circleci/build/gh/vektorcloud/apt-cacher?color=1dd6c9&logo=CircleCI&logoColor=1dd6c9&style=for-the-badge "apt-cacher"