diff options
author | Leif Johansson <leifj@sunet.se> | 2015-05-09 17:02:05 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-05-09 17:02:05 +0200 |
commit | 8a67b007b3d36864ac70a9182b0e5273411de83e (patch) | |
tree | 44e3295b5217ac0c02fa9ef05f632f2f0a2c8e44 /global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp | |
parent | cc36f13b80cbfe812218eaf94054ca0a3f1bb3b7 (diff) |
switch to sunet modulect-ops-2015-05-09-v01
Diffstat (limited to 'global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp')
-rw-r--r-- | global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp b/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp deleted file mode 100644 index 8df416b..0000000 --- a/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp +++ /dev/null @@ -1,42 +0,0 @@ -# Common use of docker::run -define sunet::docker_run( - $image, - $imagetag = hiera('sunet_docker_default_tag', 'latest'), - $volumes = [], - $ports = [], - $env = [], - $net = 'bridge', - $extra_parameters = [], -) { - - # Make container use unbound resolver on dockerhost - # If docker was just installed, facter will not know the IP of docker0. Thus the pick. - $dns = $net ? { - 'host' => [], # docker refuses --dns with --net host - default => [pick($::ipaddress_docker0, '172.17.42.1')], - } - - $image_tag = "${image}:${imagetag}" - docker::image { $image_tag : } -> - - docker::run {$name : - use_name => true, - image => $image_tag, - volumes => flatten([$volumes, - '/etc/passwd:/etc/passwd:ro', # uid consistency - '/etc/group:/etc/group:ro', # gid consistency - ]), - ports => $ports, - env => $env, - net => $net, - extra_parameters => flatten([$extra_parameters, - '--rm', - ]), - dns => $dns, - verify_checksum => false, # Rely on registry security for now. eduID risk #31. - pre_start => 'run-parts /usr/local/etc/docker.d', - post_start => 'run-parts /usr/local/etc/docker.d', - pre_stop => 'run-parts /usr/local/etc/docker.d', - } - -} |