This commit is contained in:
Jeffrey Paul 2018-10-01 18:34:41 -07:00
parent f4205a288d
commit 736bbfcbe7
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
2 changed files with 9 additions and 14 deletions

View File

@ -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 && \

View File

@ -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