set up docker and run httpd in 2 vagrant machines. 1
2429 단어 Docker
overview
Mac에 vagrant machine 2대를 준비하고 httpd를 만드는 이미지 1대를 사용하고 httpd를 1대로 시작하고 싶습니다.
Set up Vagrant machine and centOS7
in your local Mac.
bash
vagrant box add centos7_2 https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.2/vagrant-centos-7.2.box
bashmkdir docker_1
bashcd docker_1
bashvagrant init centos7_2
bashvi Vagrantfile
Change IP addressVagrantfile
config.vm.network "private_network", ip: "192.168.55.44"
bashvagrant up
Login to virtual machinebash
vagrant ssh
Set up docker in CentOS7
check linux version
bash
cat /etc/redhat-release
#CentOS Linux release 7.2.1511 (Core)
yum updatebash
sudo yum -y update
bashsudo yum install -y yum-utils device-mapper-persistent-data lvm2
bashsudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
bashsudo yum-config-manager --enable docker-ce-edge
bashsudo yum-config-manager --enable docker-ce-testing
bashsudo yum makecache fast
bashsudo yum install -y docker-ce
bashsudo systemctl start docker
bashsudo docker run hello-world
b04784fba78d: Pull complete
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
그다음에 여기.
Reference
이 문제에 관하여(set up docker and run httpd in 2 vagrant machines. 1), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/joji/items/39f5488308fc166964d8텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)