Hi Torsten

The bold values represent the defaults, so you shouldn't need to specify them.

You also have some other options set that I don't think are required.
Could you try with the following:

class { 'docker': }
docker::image { 'jenkinsci/jenkins:2.0-beta-1': }
docker::run { 'Jenkins2Beta1':
  ports            => '8080:8080',
  volumes       => '/virtual_storage/jenkins_home:/var/jenkins_home',
}

I think what is happening here is that by specifying detach you are
separating the docker container from the init script which is
generated by the module.

With regards to the docker daemon starting on boot, I think that's the
init scripts shipped with Docker. These vary depending on the OS
unfortunately. Puppet should be telling the service to be enabled:
https://github.com/garethr/garethr-docker/blob/master/manifests/service.pp#L198.

Let us know if that resolves your issue.

Gareth

On 4 April 2016 at 20:56, 'Torsten Kleiber' via Puppet Users
<puppet-users@googlegroups.com> wrote:
> Hi!
>
> I try to create a virtualbox machine with vagrant and puppet provider.
>
> According to the documentation
> https://forge.puppetlabs.com/puppetlabs/docker_platform/readme#class-docker
> I have create following manifest:
>
> class { 'docker':
>   service_enable => true,
>   service_state  => 'running',
> }
> docker::image { 'jenkinsci/jenkins:2.0-beta-1':
>   require => Class['docker'],
> }
>
> docker::run { 'Jenkins2Beta1':
>   image            => 'jenkinsci/jenkins:2.0-beta-1',
>   detach           => true,
>   ports            => '8080:8080',
>   volumes          => '/virtual_storage/jenkins_home:/var/jenkins_home',
>   running          => true,
>   extra_parameters => ['--restart unless-stopped'],
>   require          => Docker::Image['jenkinsci/jenkins:2.0-beta-1'],
> }
>
> With the bold configuration I would expect the my container 'Jenkins2Beta1'
> should be started after provisioning, which is not the case.
> I have to determine the id of the container manual via "sudo docker ps -all"
> and start it then via "sudo docker start <id>".
>
> Furthermore after restarting the virtualbox machine via "vagrant halt" and
> "vagrant up" the docker daemon has to be started manually via "sudo docker
> daemon".
>
> What is wrong in my manifest?
>
> Kind regards
> Torsten
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/389a99f5-793d-4448-8ffd-cd8adb7f6236%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAFi_6yJxDbNUzDCnv9gjOBSxY3nyxu54s-mzeYST%2B1kvSBOD_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to