github.com/nullne/docker@v1.13.0-rc1/project/PACKAGE-REPO-MAINTENANCE.md (about) 1 # Apt & Yum Repository Maintenance 2 ## A maintainer's guide to managing Docker's package repos 3 4 ### How to clean up old experimental debs and rpms 5 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 8 steps below. 9 10 1. Checkout docker master 11 12 2. Run clean scripts 13 14 ```bash 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 \ 19 -e GPG_PASSPHRASE \ 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 22 ``` 23 24 3. Upload the changed repos to `s3` (if you host on s3) 25 26 4. Purge the cache, PURGE the cache, PURGE THE CACHE! 27 28 ### How to get out of a sticky situation 29 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. 32 33 **NOTE:** These are apt repo specific, have had no experimence with anything similar 34 happening to the yum repo in the past so you can rest easy. 35 36 For each step listed below, move on to the next if the previous didn't work. 37 Otherwise CELEBRATE! 38 39 1. Purge the cache. 40 41 2. Did you remember to sign the debs after releasing? 42 43 Re-sign the repo with your gpg key: 44 45 ```bash 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 \ 50 -e GPG_PASSPHRASE \ 51 -e DOCKER_RELEASE_DIR=/volumes/repos \ 52 docker-dev:master hack/make.sh sign-repos 53 ``` 54 55 Upload the changed repo to `s3` (if that is where you host) 56 57 PURGE THE CACHE. 58 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. 61 62 ```bash 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 \ 67 -e GPG_PASSPHRASE \ 68 -e DOCKER_RELEASE_DIR=/volumes/repos \ 69 docker-dev:master hack/make.sh update-apt-repo generate-index-listing sign-repos 70 ``` 71 72 4. Upload the changed repo to `s3` (if that is where you host) 73 74 PURGE THE CACHE.