〇構築方法
以下のVagrantfileを使用して、ctopとDockerがインストールされた仮想マシン(CentOS 8.1)を構築する事ができます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-8.1"
config.vm.hostname = "co81dockerctop"
config.vm.provider :virtualbox do |vbox|
vbox.name = "co81dockerctop"
vbox.gui = true
vbox.cpus = 2
vbox.memory = 4096
end
config.vm.network "private_network", ip: "192.168.55.101", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
dnf -y install langpacks-ja
localectl set-locale LANG=ja_JP.UTF-8
dnf install -y epel-release
dnf check-update
dnf -y update
timedatectl set-timezone Asia/Tokyo
# install Docker
yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf -y --nobest install docker-ce
systemctl enable docker
systemctl start docker
usermod -aG docker vagrant
# instal docker-compose
wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-X86_64
chmod a+x /usr/local/bin/docker-compose
# instll ctop
wget https://github.com/bcicen/ctop/releases/download/v0.7.3/ctop-0.7.3-linux-amd64 -O /usr/local/bin/ctop
chmod +x /usr/local/bin/ctop
echo 'please reboot...'
SHELL
end
0 件のコメント:
コメントを投稿