Merge pull request #12387 from soapy1/update-podmain-docs

Update Podman and Docker provisioner docs
This commit is contained in:
Sophia Castellarin 2021-06-11 13:12:37 -05:00 committed by GitHub
commit 9933fec019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -63,6 +63,7 @@ Building an image is easy:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.build_image "/vagrant/app"
end
@ -87,6 +88,7 @@ pull. The first is as an array using `images`:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker",
images: ["ubuntu"]
end
@ -104,6 +106,7 @@ simple configuration method for provisioners (specifying it all in one line).
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.pull_images "ubuntu"
d.pull_images "vagrant"
@ -122,6 +125,7 @@ the `do...end` blocks. An example of running a container is shown below:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.run "rabbitmq"
end
@ -163,6 +167,7 @@ with the Vagrant shared directory mounted inside of it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.run "ubuntu",
cmd: "bash -l",
@ -176,6 +181,7 @@ so by providing different names and specifying the `image` parameter to it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.run "db-1", image: "user/mysql"
d.run "db-2", image: "user/mysql"
@ -194,6 +200,7 @@ To customize this file, use the `post_install_provision` shell provisioner.
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provision "docker" do |d|
d.post_install_provision "shell", inline:"echo export http_proxy='http://127.0.0.1:3128/' >> /etc/default/docker"
d.run "ubuntu",

View File

@ -60,6 +60,7 @@ Building an image is easy:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman" do |d|
d.build_image "/vagrant/app"
end
@ -84,6 +85,7 @@ pull. The first is as an array using `images`:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman",
images: ["ubuntu"]
end
@ -101,6 +103,7 @@ simple configuration method for provisioners (specifying it all in one line).
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman" do |d|
d.pull_images "ubuntu"
d.pull_images "vagrant"
@ -119,6 +122,7 @@ the `do...end` blocks. An example of running a container is shown below:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman" do |d|
d.run "rabbitmq"
end
@ -160,6 +164,7 @@ with the Vagrant shared directory mounted inside of it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman" do |d|
d.run "ubuntu",
cmd: "bash -l",
@ -173,6 +178,7 @@ so by providing different names and specifying the `image` parameter to it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provision "podman" do |d|
d.run "db-1", image: "user/mysql"
d.run "db-2", image: "user/mysql"