1 # Apt & Yum Repository Maintenance
2 ## A maintainer's guide to managing Docker's package repos
4 ### How to clean up old experimental debs and rpms
6 We release debs and rpms for experimental nightly, so these can build up.
7 To remove old experimental debs and rpms, and _ONLY_ keep the latest, follow the
10 1. Checkout docker master
15 docker build --rm --force-rm -t docker-dev:master .
16 docker run --rm -it --privileged \
17 -v /path/to/your/repos/dir:/volumes/repos \
18 -v $HOME/.gnupg:/root/.gnupg \
20 -e DOCKER_RELEASE_DIR=/volumes/repos \
21 docker-dev:master hack/make.sh clean-apt-repo clean-yum-repo generate-index-listing sign-repos
24 3. Upload the changed repos to `s3` (if you host on s3)
26 4. Purge the cache, PURGE the cache, PURGE THE CACHE!
28 ### How to get out of a sticky situation
30 Sh\*t happens. We know. Below are steps to get out of any "hash-sum mismatch" or
31 "gpg sig error" or the likes error that might happen to the apt repo.
33 **NOTE:** These are apt repo specific, have had no experience with anything similar
34 happening to the yum repo in the past so you can rest easy.
36 For each step listed below, move on to the next if the previous didn't work.
41 2. Did you remember to sign the debs after releasing?
43 Re-sign the repo with your gpg key:
46 docker build --rm --force-rm -t docker-dev:master .
47 docker run --rm -it --privileged \
48 -v /path/to/your/repos/dir:/volumes/repos \
49 -v $HOME/.gnupg:/root/.gnupg \
51 -e DOCKER_RELEASE_DIR=/volumes/repos \
52 docker-dev:master hack/make.sh sign-repos
55 Upload the changed repo to `s3` (if that is where you host)
59 3. Run Jess' magical, save all, only in case of extreme emergencies, "you are
60 going to have to break this glass to get it" script.
63 docker build --rm --force-rm -t docker-dev:master .
64 docker run --rm -it --privileged \
65 -v /path/to/your/repos/dir:/volumes/repos \
66 -v $HOME/.gnupg:/root/.gnupg \
68 -e DOCKER_RELEASE_DIR=/volumes/repos \
69 docker-dev:master hack/make.sh update-apt-repo generate-index-listing sign-repos
72 4. Upload the changed repo to `s3` (if that is where you host)