使用Vagrant 建立 swagger editor

  • 先建立 Vagrant file
vagrant init centos/7
  • 手動建立環境
config.vm.provision "shell", inline: <<-SHELL
      sudo yum install -y yum-utils device-mapper-persistent-data lvm2
      sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      sudo yum-config-manager --enable docker-ce-edge
      sudo yum-config-manager --enable docker-ce-test
      sudo yum makecache fast
      sudo yum install -y docker-ce
      sudo systemctl start docker
      sudo docker pull swaggerapi/swagger-editor
      sudo docker run -d -p 80:8080 swaggerapi/swagger-editor
   SHELL