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 in Puppet by Chaitra
18 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 by Sirajul
• 38,420 points

Related Questions In Puppet

0 votes
0 answers
0 votes
1 answer
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 in Puppet by Sirajul
• 38,420 points
33 views
0 votes
1 answer

Puppet+Docker: Using Docker-Compose with Puppet

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

answered Aug 14 in Puppet by Sirajul
• 38,420 points
137 views
0 votes
1 answer
0 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
• 56,940 points
227 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 in Puppet by Sirajul
• 38,420 points
31 views