mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
modify repo and docs for lxc only
This commit is contained in:
parent
620107212e
commit
a954759dae
27 changed files with 67 additions and 340 deletions
|
@ -1,38 +0,0 @@
|
|||
# install
|
||||
yum install lxc lxc-templates debootstrap libvirt
|
||||
|
||||
# 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 git tzdata nano dpkg-dev build-essential python python3 ruby nodejs golang php7.2 r-base mono-complete nasm openjdk-8-jdk
|
||||
apt-get -y install ubuntu-make
|
||||
umake swift
|
||||
set dir to /opt/swift/swift-lang
|
||||
ln -s /opt/swift/swift-lang/usr/bin/swift /usr/bin/swift
|
||||
|
||||
|
||||
# create users and apply limits
|
||||
for i in {1..150}; do
|
||||
#userdel runner$i
|
||||
useradd -M runner$i
|
||||
usermod -d /tmp runner$i
|
||||
echo "runner$i soft nproc 64" >> /etc/security/limits.conf
|
||||
echo "runner$i hard nproc 64" >> /etc/security/limits.conf
|
||||
echo "runner$i soft nofile 2048" >> /etc/security/limits.conf
|
||||
echo "runner$i hard nofile 2048" >> /etc/security/limits.conf
|
||||
done
|
||||
|
||||
# remove home dir
|
||||
rm -rf /home/ubuntu
|
||||
|
||||
# set tmp
|
||||
chmod 755 /tmp
|
Loading…
Add table
Add a link
Reference in a new issue