Commit 1bae717b authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Cloud runner sysbox 0.4.0 new packer image

parent 8a5c4240
......@@ -24,45 +24,15 @@ write_files:
- owner: 'root:root'
path: /root/
content: |
cd /root
git clone
cd sysbox
git checkout d5c74b5e9025d663efd3de6ce5fa8bc6f7fcea3b
sed -i 's/\/\/\//' .gitmodules
git submodule update --init
sed -i 's/\/\/\//' sysbox-fs/.gitmodules
sed -i 's/\/\/\//' sysbox-libs/.gitmodules
git -C sysbox-fs submodule update --init
git -C sysbox-libs submodule update --init
apt-get install -y make
make sysbox
make install
docker image prune -a -f
apt-get remove -y --purge make
cd ..
rm -rf sysbox
mkdir sysbox
cd sysbox
wget -q -O sysbox.deb
apt-get install -y binutils
ar x sysbox.deb
apt-get remove -y --purge binutils
tar xf control.tar.xz
tar xf data.tar.xz
apt-get install -y linux-headers-generic
cp lib/sysctl.d/99-sysbox.conf /lib/sysctl.d/
cp lib/systemd/system/sysbox-fs.service /lib/systemd/system/
cp lib/systemd/system/sysbox-mgr.service /lib/systemd/system/
cp lib/systemd/system/sysbox.service /lib/systemd/system/
./postinst configure
cd ..
rm -rf sysbox
rm -rf /pkg
systemctl enable sysbox-fs.service
systemctl enable sysbox-mgr.service
systemctl enable sysbox.service
cd /root
modprobe shiftfs
echo shiftfs >> /etc/modules
apt-get install ./sysbox-ce_0.4.0-0.ubuntu-focal_amd64.deb
jq --indent 4 '. + {"default-runtime": "sysbox-runc"}' /etc/docker/daemon.json > /tmp/daemon.json
cp /tmp/daemon.json /etc/docker/daemon.json
echo "DefaultLimitNOFILE=524288:524288" >> /etc/systemd/system.conf
echo "vm.swappiness=10" >> /etc/sysctl.conf
echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
# sysbox-mgr needs more than 1024 open files
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment