docker-ubuntumirror/README.markdown

62 lines
1.9 KiB
Markdown
Raw Normal View History

2016-04-09 13:22:33 +00:00
# sneak/ubuntumirror
2020-02-15 18:21:00 +00:00
Docker image for syncing ubuntu LTS mirrors to reduce network traffic and
speed up build times.
2016-04-09 13:22:33 +00:00
2020-02-15 18:21:00 +00:00
Then even your builds (where you can't specify links to other containers by
hostname) will go fast.
2016-04-09 13:22:33 +00:00
# Levers
2020-02-15 18:29:22 +00:00
## Paths
The mirror stores all the data in a docker volume at path
`/var/mirror/ubuntu`. Map that somewhere else if you like.
2020-02-15 18:21:00 +00:00
## Environment Variables
2020-02-15 18:29:22 +00:00
* `UBUNTU_MIRROR_ARCHITECTURES`
2020-02-15 18:21:00 +00:00
* default `amd64`.
2016-04-09 13:22:33 +00:00
* You may want `i386,amd64`.
2020-02-15 18:29:22 +00:00
* `UBUNTU_MIRROR_CATEGORIES`
2020-02-15 18:21:00 +00:00
* Default `main,universe,restricted,multiverse`. Will use lots of disk.
* You may want `main,universe`.
* `UBUNTU_MIRROR_PROJECTS`
2020-02-15 18:21:00 +00:00
* Default
`bionic,bionic-updates,bionic-security,bionic-backports,focal,focal-updates,focal-security,focal-backports`.
* You may want only `focal,focal-updates,focal-security,focal-backports`.
2020-02-15 18:29:22 +00:00
* `UBUNTU_MIRROR_UPSTREAM` - upstream server to mirror from
2016-04-09 13:22:33 +00:00
* default `archive.ubuntu.com`.
* You may want `xx.archive.ubuntu.com` (where `xx` is your country
code).
2020-02-15 18:29:22 +00:00
* `UBUNTU_ENABLE_SOURCE_MIRRORING` - do we want to mirror all the source code too?
2020-02-15 18:21:00 +00:00
* Default ``
* You may want `1` if you want to use up even more disk for your mirror
2020-02-15 18:29:22 +00:00
* `MIRROR_UPDATE_INTERVAL_SECONDS` - mirror update interval
2016-04-09 14:18:35 +00:00
* default `43200` (12h)
* You may want `10800` (3h)
2016-04-09 13:22:33 +00:00
2020-02-15 18:29:22 +00:00
# Example Startup
```
docker rm -f local-ubuntu-mirror
docker run -d --name local-ubuntu-mirror \
-v /storage/mirrors/ubuntu:/var/mirror/ubuntu \
--env MIRROR_UPDATE_INTERVAL_SECONDS=3600 \
--env UBUNTU_MIRROR_ARCHITECTURES=amd64 \
--env UBUNTU_MIRROR_UPSTREAM=us.archive.ubuntu.com \
--env UBUNTU_MIRROR_PROJECTS=focal,focal-updates,focal-security,focal-backports \
-p 8080:80 \
--restart unless-stopped \
sneak/ubuntumirror:latest
```
2020-02-15 18:21:00 +00:00
# Example CapRover Definition File
2016-04-09 13:22:33 +00:00
```
2020-02-15 18:21:00 +00:00
{
"schemaVersion": 2,
"imageName": "sneak/ubuntumirror:latest"
}
2016-04-09 13:22:33 +00:00
```