Skip to content

Commit 84aef20

Browse files
committed
Update docker compose version & deploy it as docker plugin
1 parent c3c4d6f commit 84aef20

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

manifests/compose.pp

+16
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
$docker_compose_location = "${install_path}/${symlink_name}${file_extension}"
5858
$docker_compose_location_versioned = "${install_path}/docker-compose-${version}${file_extension}"
59+
$docker_plugins_path = '/usr/local/lib/docker/cli-plugins'
5960

6061
if $ensure == 'present' {
6162
if $raw_url != undef {
@@ -97,6 +98,15 @@
9798
require => Package['curl'],
9899
}
99100

101+
file { '/usr/local/lib/docker':
102+
ensure => directory,
103+
}
104+
105+
file { $docker_plugins_path:
106+
ensure => directory,
107+
require => File['/usr/local/lib/docker'],
108+
}
109+
100110
file { $docker_compose_location_versioned:
101111
owner => $file_owner,
102112
mode => '0755',
@@ -109,6 +119,12 @@
109119
target => $docker_compose_location_versioned,
110120
require => File[$docker_compose_location_versioned],
111121
}
122+
123+
file { "${docker_plugins_path}/docker-compose":
124+
ensure => 'link',
125+
target => $docker_compose_location_versioned,
126+
require => File[$docker_plugins_path],
127+
}
112128
}
113129
} else {
114130
file { $docker_compose_location_versioned:

manifests/params.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@
9191

9292
if ($facts['os']['family'] == 'windows') {
9393
$compose_install_path = "${::docker_program_files_path}/Docker"
94-
$compose_version = '1.29.2'
94+
$compose_version = '2.16.0'
9595
$docker_ee_package_name = 'Docker'
9696
$machine_install_path = "${::docker_program_files_path}/Docker"
9797
$tls_cacert = "${::docker_program_data_path}/docker/certs.d/ca.pem"
9898
$tls_cert = "${::docker_program_data_path}/docker/certs.d/server-cert.pem"
9999
$tls_key = "${::docker_program_data_path}/docker/certs.d/server-key.pem"
100100
} else {
101101
$compose_install_path = '/usr/local/bin'
102-
$compose_version = '1.29.2'
102+
$compose_version = '2.16.0'
103103
$docker_ee_package_name = 'docker-ee'
104104
$machine_install_path = '/usr/local/bin'
105105
$tls_cacert = '/etc/docker/tls/ca.pem'

0 commit comments

Comments
 (0)