<%
extra_options = node['docker-grid']['engine']['daemon_extra_options']

storage_driver = node['docker-grid']['engine']['storage-driver']
storage_driver_option = ''
if !storage_driver.nil? && !storage_driver.empty?
  storage_driver_option = "--storage-driver=#{storage_driver}"
end

userns_remap = node['docker-grid']['engine']['userns-remap']
userns_remap_option = ''
if !userns_remap.nil? && !userns_remap.empty?
  userns_remap_option = "--userns-remap=#{userns_remap}"
end
-%>
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon <%= storage_driver_option %> <%= userns_remap_option %> <%= extra_options %>
