Docker image for running a Debian repository based on this wiki page.
# Passphrase for GPG key: insecure
docker run --rm -it -p 80:80 -v $PWD/repo-demo:/mnt:ro -e RELEASE=bookworm casperklein/debian-repo
./build.sh
-
Copy repo-demo
cp -a repo-demo myrepo
-
Create/Export new GPG key
gpg --gen-key
gpg -a -o myrepo/key.gpg --export-secret-keys <ID>
-
Edit myrepo/distributions to your needs
At least, you have to set SignWith to your GPG subkey ID
gpg --list-secret-key --with-subkey-fingerprint # show subkey ID
If you change "Codename", you have to adjust
-e RELEASE=
below accordingly. -
Serve repository via HTTP
docker run --rm -it -p 80:80 -v $PWD/myrepo:/mnt:ro -e RELEASE=bookworm casperklein/debian-repo
wget -O - http://HOSTNAME/repos/apt/debian/repo.gpg | apt-key add -
echo "deb http://HOSTNAME/repos/apt/debian/ $(lsb_release -cs) main" >> /etc/apt/sources.list