1 Star 0 Fork 16

KingWYJ/safeguard

forked from openEuler/safeguard 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Vagrantfile 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
Tongyx 提交于 2023-09-27 11:01 . first commit
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2110" #"ubuntu/impish64"
config.vm.synced_folder ".", "/vagrant"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y \
wget \
curl \
build-essential \
libbpf-dev \
clang \
gcc-multilib \
llvm \
zlib1g-dev \
libelf-dev \
linux-tools-generic \
linux-tools-common \
linux-headers-$(uname -r) \
linux-tools-$(uname -r) \
ca-certificates \
gnupg \
lsb-release \
gotestsum
# Setup Golang
wget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz -O /tmp/go1.17.5.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go1.17.5.linux-amd64.tar.gz && ln -sf /usr/local/go/bin/go /usr/bin/go
echo "PATH=\$PATH:/usr/local/go/bin" > /etc/profile
mkdir -p /opt/go/{bin,src}
echo "GOROOT=/opt/go" >> /etc/profile
# Enable BPF LSM
sed -i 's/GRUB_CMDLINE_LINUX=\"\"$/GRUB_CMDLINE_LINUX=\"lsm=lockdown,yama,apparmor,bpf\"/' /etc/default/grub
update-grub
# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
# Setup IPv6
cat <<EOF >/etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "fc00:deed:beef::/24"
}
EOF
systemctl restart docker
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
SHELL
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kingwyj/safeguard.git
[email protected]:kingwyj/safeguard.git
kingwyj
safeguard
safeguard
master

搜索帮助