Compare commits
12 Commits
d261e0763b
...
next
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e84d93951 | |||
| d402abd69b | |||
| a2b750a71e | |||
| 3b4e6fdc38 | |||
| 587425b1ed | |||
| 0d8f43c685 | |||
| 1256279e1c | |||
| 9217e7367e | |||
| 0b821850d2 | |||
| a18f1b41fa | |||
| 5fbe1f088a | |||
| ca7375fab1 |
@@ -12,7 +12,7 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
tags:
|
||||
- ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}
|
||||
- ${DRONE_COMMIT_SHA}
|
||||
- ${DRONE_BRANCH/\//-}
|
||||
|
||||
|
||||
- latest
|
||||
|
||||
@@ -48,7 +48,7 @@ docker run -d --name local-ubuntu-mirror \
|
||||
--env UBUNTU_MIRROR_PROJECTS=focal,focal-updates,focal-security,focal-backports \
|
||||
-p 8080:80 \
|
||||
--restart unless-stopped \
|
||||
sneak/ubuntumirror:latest
|
||||
sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02
|
||||
```
|
||||
|
||||
# Example CapRover Definition File
|
||||
@@ -56,6 +56,15 @@ docker run -d --name local-ubuntu-mirror \
|
||||
```
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"imageName": "sneak/ubuntumirror:latest"
|
||||
"imageName": "sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02"
|
||||
}
|
||||
```
|
||||
|
||||
# Author
|
||||
|
||||
sneak <[sneak@sneak.berlin](mailto:sneak@sneak.berlin)>
|
||||
|
||||
# License
|
||||
|
||||
This software is released into the public domain.
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ rm -rf /var/mirror/ubuntu/.temp
|
||||
while sleep 1 ; do
|
||||
cd /opt/mirror && make
|
||||
|
||||
sleep ${MIRROR_INTERVAL_SECONDS}
|
||||
sleep ${MIRROR_UPDATE_INTERVAL_SECONDS}
|
||||
done
|
||||
|
||||
@@ -16,17 +16,26 @@ if [[ "$UBUNTU_ENABLE_SOURCE_MIRRORING" != "false" ]]; then
|
||||
SOURCEOPT="--source"
|
||||
fi
|
||||
|
||||
DONE=0
|
||||
|
||||
while [[ $DONE -eq 0 ]]; do
|
||||
debmirror \
|
||||
-a ${UBUNTU_MIRROR_ARCHITECTURES} \
|
||||
-s ${UBUNTU_MIRROR_CATEGORIES} \
|
||||
-h ${UBUNTU_MIRROR_UPSTREAM} \
|
||||
-d ${UBUNTU_MIRROR_PROJECTS} \
|
||||
$SOURCEOPT \
|
||||
--di-dist=dists \
|
||||
--di-arch=arches \
|
||||
--ignore-small-errors \
|
||||
-r /ubuntu \
|
||||
--getcontents \
|
||||
--progress \
|
||||
--method=http \
|
||||
$DST/ubuntu
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
DONE=1
|
||||
fi
|
||||
chmod -R a+rX $DST
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -3,11 +3,14 @@ worker_processes auto;
|
||||
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
error_log /dev/stdout info;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
access_log /dev/stdout;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
|
||||
11
sources.list
11
sources.list
@@ -1,7 +1,4 @@
|
||||
# this can't be {us.,}archive.ubuntu.org because on the box
|
||||
# with dnsmasq changing that host to itself, rebuilding this fails
|
||||
# unless the container is running already
|
||||
deb http://mirrors.sonic.net/ubuntu bionic main universe
|
||||
deb http://mirrors.sonic.net/ubuntu bionic-updates main universe
|
||||
deb http://mirrors.sonic.net/ubuntu bionic-backports main universe
|
||||
deb http://mirrors.sonic.net/ubuntu bionic-security main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main universe restricted multiverse
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main universe restricted multiverse
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main universe restricted multiverse
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main universe restricted multiverse
|
||||
|
||||
Reference in New Issue
Block a user