![]() |
6 天之前 | |
---|---|---|
admin | 6 天之前 | |
data | 1 周之前 | |
dist | 1 月之前 | |
scripts | 1 周之前 | |
.gitignore | 1 月之前 | |
Dockerfile | 1 周之前 | |
README.md | 6 天之前 | |
build.sh | 1 月之前 | |
docker-compose.src.yml | 3 周之前 | |
entrypoint.sh | 3 周之前 | |
setup.sh | 1 周之前 | |
start.sh | 1 月之前 | |
upgrade.sh | 6 天之前 |
A containerized APT mirror solution with a web interface. This project provides a complete local Ubuntu / Debian package repository with an admin panel and file hosting capabilities.
mirror.intra
- DEB packages repositoryadmin.mirror.intra
- Admin panel with authenticationfiles.mirror.intra
- File hosting service┌─────────────────────────────────────────────────────────────┐
│ UI APT Mirror Container │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ nginx │ │ apt-mirror2 │ │ health-check│ │
│ │ (web) │ │ (sync) │ │ (monitor) │ │
│ │ │ │ (Python) │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ mirror.intra │ admin.mirror.intra │ files.mirror.intra │
│ (packages) │ (admin panel) │ (file hosting) │
└─────────────────────────────────────────────────────────────┘
First, build the Docker images for your architecture:
./build.sh
This will create:
dist/ui-apt-mirror-amd64.tar.gz
(for x86_64 systems)dist/ui-apt-mirror-arm64.tar.gz
(for ARM64 systems)Run the setup script to deploy the container:
./setup.sh
The script will:
mirror.intra
)http://mirror.intra
http://admin.mirror.intra
http://files.mirror.intra
To use the local repository on your Ubuntu systems, add the following to /etc/apt/sources.list
:
# Replace mirror.intra with your custom domain
# For Ubuntu 24.04 (Noble)
Types: deb
URIs: http://mirror.intra/archive.ubuntu.com/ubuntu
Suites: noble noble-updates noble-security noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# For Debian 12 (Bookworm)
deb http://mirror.intra/deb.debian.org/debian bookworm main non-free-firmware
deb http://mirror.intra/security.debian.org/debian-security bookworm-security main non-free-firmware
deb http://mirror.intra/deb.debian.org/debian bookworm-updates main non-free-firmware
Then update your package lists:
sudo apt update
Access the admin panel at http://admin.mirror.intra
to:
Use the file repository at http://files.mirror.intra
to:
To upgrade to the latest version:
./upgrade.sh
The upgrade script will:
ui-apt-mirror/
├── build.sh # Build script for Docker images
├── setup.sh # Deployment and configuration script
├── upgrade.sh # Upgrade script for latest version
├── README.md # This file
├── .env # Configuration file (generated)
├── docker-compose.src.yml # Docker Compose template
├── docker-compose.yml # Generated Docker Compose file
├── dist/ # Built Docker images
│ ├── ui-apt-mirror-amd64.tar.gz
│ └── ui-apt-mirror-arm64.tar.gz
├── Dockerfile # Multi-stage Docker build
├── entrypoint.sh # Container startup script
├── scripts/ # Service scripts
└── web/ # Web content
├── mirror.intra/
├── admin.mirror.intra/
└── files.mirror.intra/
└── data/ # Persistent data and configuration
├── data/apt-mirror/ # APT mirror data
├── data/files/ # File hosting data
├── logs/apt-mirror/ # Application logs
├── logs/nginx/ # Nginx logs
├── conf/apt-mirror/ # APT mirror configuration
└── conf/nginx/ # Nginx configurations
This project is licensed under the MIT License - see the LICENSE file for details.