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,977 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,190 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,190 points
1,490 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,190 points
1,665 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,190 points
4,326 views
+2 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,682 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,190 points
1,752 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