piston/lxc/notes.txt

27 lines
1.0 KiB
Plaintext

# install
yum install lxc lxc-template debootstrap
# create container
lxc-create -t download -n piston
select ubuntu, bionic, amd64
# start container
lxc-start -n piston -d
# shell in and install stuff
lxc-attach -n piston
export PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
sed -i 's/http:\/\/archive.ubuntu.com\/ubuntu/http:\/\/mirror.math.princeton.edu\/pub\/ubuntu/' /etc/apt/sources.list
apt-get update
apt-get -y install tzdata nano dpkg-dev build-essential python python3 ruby nodejs golang php7.2 r-base mono-complete nasm openjdk-8-jdk
# apply limits
echo 'ubuntu soft nproc 128' >> /etc/security/limits.conf
echo 'ubuntu hard nproc 128' >> /etc/security/limits.conf
echo 'ubuntu soft nofile 1024' >> /etc/security/limits.conf
echo 'ubuntu hard nofile 1024' >> /etc/security/limits.conf
echo 'runner soft nproc 16' >> /etc/security/limits.conf
echo 'runner hard nproc 16' >> /etc/security/limits.conf
echo 'runner soft nofile 512' >> /etc/security/limits.conf
echo 'runner hard nofile 512' >> /etc/security/limits.conf