2018-10-22 23:38:52 +02:00
|
|
|
# install
|
2018-10-22 23:53:55 +02:00
|
|
|
yum install lxc lxc-templates debootstrap libvirt
|
2018-10-22 23:38:52 +02:00
|
|
|
|
|
|
|
# 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
|