diff --git a/templates/default/docker.service.erb b/templates/default/docker.service.erb index 90d28ae37b..16c33da6c4 100644 --- a/templates/default/docker.service.erb +++ b/templates/default/docker.service.erb @@ -9,7 +9,7 @@ Type=simple Environment="HTTP_PROXY=<%= node['docker']['http_proxy'] %>" <% end -%> ExecStartPre=/usr/sbin/sysctl -w net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 -ExecStart=<%= node['docker']['install_dir'] %>/docker -d<%= node['docker']['bind_socket'] ? " -H #{node['docker']['bind_socket']}" : '' %><%= node['docker']['bind_uri'] ? " -H #{node['docker']['bind_uri']}" : '' %><%= node['docker']['container_init_type'] ? ' -r=false' : '' %><%= node['docker']['options'] ? " #{node['docker']['options']}" : '' %><%= node['docker']['storage_driver'] ? " -s #{node['docker']['storage_driver']}" : '' %> +ExecStart=<%= node['docker']['install_dir'] %>/docker -d<%= node['docker']['bind_socket'] ? " -H #{node['docker']['bind_socket']}" : '' %><%= node['docker']['bind_uri'] ? " -H #{node['docker']['bind_uri']}" : '' %><%= node['docker']['container_init_type'] ? ' -r=false' : '' %><%= node['docker']['options'] ? " #{node['docker']['options']}" : '' %><%= node['docker']['storage_driver'] ? " -s #{node['docker']['storage_driver']}" : '' %><%= node['docker']['exec_driver'] ? " -e #{node['docker']['exec_driver']}" : '' %> Restart=on-failure [Install] diff --git a/templates/default/docker.sysconfig.erb b/templates/default/docker.sysconfig.erb index 768fa4d7b1..7ce6740dd9 100644 --- a/templates/default/docker.sysconfig.erb +++ b/templates/default/docker.sysconfig.erb @@ -19,6 +19,9 @@ DOCKER_OPTS="$DOCKER_OPTS <%= node['docker']['options'] %>" <% if node['docker']['storage_driver'] -%> DOCKER_OPTS="$DOCKER_OPTS -s <%= node['docker']['storage_driver'] %>" <% end -%> +<% if node['docker']['exec_driver'] -%> +DOCKER_OPTS="$DOCKER_OPTS -e <%= node['docker']['exec_driver'] %>" +<% end -%> # If you need Docker to use an HTTP proxy, it can also be specified here. <% if node['docker']['http_proxy'] -%> diff --git a/templates/default/sv-docker-run.erb b/templates/default/sv-docker-run.erb index 3cb59195a7..9839b0a3a1 100644 --- a/templates/default/sv-docker-run.erb +++ b/templates/default/sv-docker-run.erb @@ -3,4 +3,4 @@ exec 2>&1 <% if node['docker']['http_proxy'] -%> export HTTP_PROXY=<%= node['docker']['http_proxy'] %> <% end -%> -exec <%= node['docker']['install_dir'] %>/docker -d<%= node['docker']['bind_socket'] ? " -H #{node['docker']['bind_socket']}" : '' %><%= node['docker']['bind_uri'] ? " -H #{node['docker']['bind_uri']}" : '' %><%= node['docker']['container_init_type'] ? ' -r=false' : '' %><%= node['docker']['options'] ? " #{node['docker']['options']}" : '' %><%= node['docker']['storage_driver'] ? " -s #{node['docker']['storage_driver']}" : '' %> +exec <%= node['docker']['install_dir'] %>/docker -d<%= node['docker']['bind_socket'] ? " -H #{node['docker']['bind_socket']}" : '' %><%= node['docker']['bind_uri'] ? " -H #{node['docker']['bind_uri']}" : '' %><%= node['docker']['container_init_type'] ? ' -r=false' : '' %><%= node['docker']['options'] ? " #{node['docker']['options']}" : '' %><%= node['docker']['storage_driver'] ? " -s #{node['docker']['storage_driver']}" : '' %><%= node['docker']['exec_driver'] ? " -e #{node['docker']['exec_driver']}" : '' %>