Skip to content

Running under systemd nspawn

biji edited this page Jul 27, 2016 · 9 revisions

WIP

This will run sync-engine under systemd-nspawn. I'm using Fedora 24

#Setup ubuntu tree:
debootstrap --arch=amd64 precise ./ubuntu

#Clone sync engine
git clone https://github.com/nylas/sync-engine.git ubuntu/sync-engine

#Setup resolv.conf:
rm ./ubuntu/etc/resolv.conf
echo nameserver 8.8.8.8 > ./ubuntu/etc/resolv.conf

#Fix repo source:
echo "deb http://ca.archive.ubuntu.com/ubuntu precise-updates main restricted
deb http://ca.archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe multiverse" > ./ubuntu/etc/apt/sources.list

#Spawn OS:
systemd-nspawn -D ./ubuntu/

#fix old selinux lib
apt-get install wget
wget http://mirrors.kernel.org/ubuntu/pool/main/libs/libselinux/libselinux1_2.2.2-1_amd64.deb && dpkg -i libselinux1_2.2.2-1_amd64.deb && rm -f libselinux1_2.2.2-1_amd64.deb

#update repo
#rm -f /usr/bin/chage /usr/bin/chfn
#ln -s /bin/true /usr/bin/chage
#ln -s /bin/true /usr/bin/chfn
apt-get update

#Run setup.sh
cd /sync-engine
./setup.sh
Clone this wiki locally