Docker with Puppet Run a conatiner using a native volume

0 votes
How does docker know if it has to use a bind mount or a volume while running a container? How can i use a native volume stored on my host machine to be used while running a docker container via puppet?
Aug 16, 2019 in Puppet by Chaitra
1,299 views

1 answer to this question.

0 votes

When using the volumes array with docker::run, the command on the backend will know if it needs to use bind mounts or volumes based on data passed to the -v option.

Running docker::run with native volumes:

docker::run { 'helloworld':
  image   => 'ubuntu:precise',
  command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
  volumes => ['my-volume:/var/log'],
}
answered Aug 16, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
0 answers
0 votes
1 answer

Puppet+Docker: How do i configure my docker container to use a NFS volume?

docker_volume { 'nfs-volume': ensure => ...READ MORE

answered Aug 13, 2019 in Puppet by Sirajul
• 59,230 points
755 views
0 votes
1 answer

Puppet+Docker: How do i configure my docker container to use a NFS volume through a Hiera config file?

If using Hiera, configure the docker::volumes class in the ...READ MORE

answered Aug 14, 2019 in Puppet by Sirajul
• 59,230 points
938 views
0 votes
1 answer

Puppet+Docker: Using Docker-Compose with Puppet

Docker Compose describes a set of containers ...READ MORE

answered Aug 14, 2019 in Puppet by Sirajul
• 59,230 points
3,434 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,731 views
0 votes
1 answer

Docker with Puppet: How do i run the following command "docker build -t ubuntu /tmp/ubuntu_image" using puppet code?

 Hey @Liana, Including the docker_dir parameter is equivalent to ...READ MORE

answered Aug 16, 2019 in Puppet by Sirajul
• 59,230 points
1,016 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP