diff --git a/Dockerfile b/Dockerfile index fc51ce6..bd4fe2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN \ apt update && \ apt upgrade -y && \ - apt install -y golang git build-essential rsync debmirror && \ + apt install -y golang git build-essential rsync debmirror ubuntu-archive-keyring && \ go get -u github.com/ipfs/ipfs-update && \ /root/go/bin/ipfs-update install latest && \ rm -rf /root/go && \ diff --git a/sync.run b/sync.run index d5c6b9e..531b97f 100644 --- a/sync.run +++ b/sync.run @@ -17,7 +17,7 @@ # Make a full sync of an Ubuntu mirror. # This currently requires more than 1TB of storage space and takes a long time. -sleep 1 # prevent cpu spike on looping +sleep 60 # prevent cpu spike on looping export MIRROR_DIR=/var/lib/ubuntumirror export IPFS_PATH=/var/lib/ipfs @@ -27,9 +27,11 @@ if [[ ! -d $MIRROR_DIR ]]; then chown ipfs:ipfs $MIRROR_DIR fi -if [[ ! -d /etc/debmirror/gnupg ]]; then - mkdir -p /etc/debmirror/gnupg - chown ipfs:ipfs /etc/debmirror/gnupg +export GNUPGHOME=/etc/debmirror/gnupg + +if [[ ! -d $GNUPGHOME ]]; then + mkdir -p $GNUPGHOME + chown ipfs:ipfs $GNUPGHOME fi chpst -u ipfs /bin/bash << '__EOF__' @@ -38,15 +40,8 @@ export IPFS=/usr/local/bin/ipfs export HOME=/home/ipfs export IPFS_FD_MAX=4096 -export GNUPGHOME=/etc/debmirror/gnupg - -gpg \ - --keyring $GNUPGHOME/trustedkeys.kbx --no-default-keyring \ - --import /usr/share/keyrings/ubuntu-archive-keyring.gpg \ - -gpg \ - --keyring $GNUPGHOME/trustedkeys.kbx --no-default-keyring \ - --recv-key 40976EAF437D05B5 +gpg --no-default-keyring --keyring $GNUPGHOME/trustedkeys.kbx --import \ + /usr/share/keyrings/ubuntu*.gpg $IPFS config --json Experimental.FilestoreEnabled true