Puppet Class: docker::profile::run_examples

Defined in:
manifests/profile/run_examples.pp

Overview

Parameters:

  • ensure (Variant[Boolean,String]) (defaults to: present)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/profile/run_examples.pp', line 1

class docker::profile::run_examples (

  Variant[Boolean,String] $ensure              = present,

) {

  include ::docker

  # Run, in command mode, a container based on official jenkins image
  ::docker::run { 'jenkins':
    ensure           => $ensure,
    image            => 'jenkins',
    run_mode         => 'command',
    run_options      => '-p 8080:8080 -p 50000:50000',
    require          => Class['docker'],
  }

  # Run a local image built with docker::push
#  ::docker::run { 'puppet-agent': 
#    ensure           => $ensure,
#    require          => Class['docker'],
#  }
#  ::docker::run { 'apache': 
#    ensure           => $ensure,
#    require          => Class['docker'],
#  }


  # Run, in service mode (an init file is created and a service started), an official redis instance
  ::docker::run { 'redis':
    ensure           => $ensure,
    image            => 'redis',
    # run_mode         => 'service',
    container_name   => 'official_redis',
    require          => Class['docker'],
  }
 
  ::docker::run { 'registry':
    ensure           => $ensure,
    image            => 'registry',
    repository_tag   => '2.4.0',
    run_mode         => 'command',
    run_options      => '-p 5000:5000',
    require          => Class['docker'],
  }

}