# docker-grid CHANGELOG
+1.3.2
+-----
+- adds the latest Ubuntu support.
+
1.3.1
-----
- removes an extra attribute.
owner 'root'
group 'root'
mode '0644'
+ helpers Chef::Mixin::ShellOut
notifies :run, 'bash[apt-key_adv_docker_tools_key]', :before
notifies :run, "execute[#{apt_get_update}]", :immediately
end
<%= override_apt_line %>
<%
else
+ apt_repo_url = node['docker-grid']['apt_repo']['url']
+
if enable_new_repo
+ codename = node['lsb']['codename']
+ codename = +codename # unfreeze
+
+ # for the latest Ubuntu
+ if node['platform'] == 'ubuntu'
+ lap_behind = ['trusty', 'xenial', 'yakkety', 'zesty']
+ result = shell_out!(%q(curl -sS https://download.docker.com/linux/ubuntu/dists/ | awk -F'</?a[^>]*>' '/<\/a>/ {print $2}' | tr -d / | grep -v '\.\.' | sort))
+ codenames = result.stdout.chomp.split("\n") if result.exitstatus.zero? && !result.stdout.chomp.empty?
+ if codenames.include?(codename)
+ Chef::Log.info("Ubuntu #{codename} is supported by the dockerproject.")
+ else
+ codenames.reverse_each {|cn|
+ next if lap_behind.include?(cn)
+
+ Chef::Log.warn("Ubuntu #{codename} is not supported by the dockerproject yet, use #{cn} repository instead.")
+ codename = cn # latest codename
+ break
+ }
+ end
+ end
-%>
-deb [arch=<%= arch %>] <%= node['docker-grid']['apt_repo']['url'] %> <%= node['lsb']['codename'] %> <%= node['docker-grid']['dockerproject']['apt_new_repo_sections'] %>
+deb [arch=<%= arch %>] <%= apt_repo_url %> <%= codename %> <%= node['docker-grid']['dockerproject']['apt_new_repo_sections'] %>
<%
else
-%>
-deb <%= node['docker-grid']['apt_repo']['url'] %> <%= platform %>-<%= node['lsb']['codename'] %> main
+deb <%= apt_repo_url %> <%= platform %>-<%= codename %> main
<%
end
end
#
-# Copyright 2016-2017, whitestar
+# Copyright 2016-2018, whitestar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
name 'docker4latest_ubuntu'
-description 'Docker for the latest Ubuntu'
+description '*DEPRECATED* Docker for the latest Ubuntu'
run_list(
'role[docker]',
'apt_repo' => {
# new repo.
# Check https://download.docker.com/linux/ubuntu/dists
- 'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable',
- #'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable',
+ 'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable',
+ #'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable',
# old repo.
#'override_apt_line' => 'deb https://apt.dockerproject.org/repo ubuntu-zesty main',
#'override_apt_line' => 'deb https://apt.dockerproject.org/repo ubuntu-xenial main',