docker-ubuntumirror/README.markdown

70 lines
2.1 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 \
2020-02-15 19:41:56 +00:00
sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02
2020-02-15 18:29:22 +00:00
```
2020-02-15 18:21:00 +00:00
# Example CapRover Definition File
2016-04-09 13:22:33 +00:00
```
2020-02-15 19:41:56 +00:00
{
2020-02-15 18:21:00 +00:00
"schemaVersion": 2,
2020-02-15 19:41:56 +00:00
"imageName": "sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02"
2020-02-15 18:21:00 +00:00
}
2016-04-09 13:22:33 +00:00
```
2020-02-15 18:57:52 +00:00
# Author
sneak <[sneak@sneak.berlin](mailto:sneak@sneak.berlin)>
# License
This software is released into the public domain.