Skip to content

Commit

Permalink
Adding NO_PROXY environment variable support.
Browse files Browse the repository at this point in the history
  • Loading branch information
boldfield committed Nov 6, 2014
1 parent 383cc5f commit f3e8d3c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/Configures Docker'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.35.2'
version '0.35.3'

recipe 'docker', 'Installs/Configures Docker'
recipe 'docker::aufs', 'Installs/Loads AUFS Linux module'
Expand Down
3 changes: 3 additions & 0 deletions templates/default/docker.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Environment="DOCKER_RAMDISK=<%= node['docker']['ramdisk'] %>"
<% if node['docker']['http_proxy'] -%>
Environment="HTTP_PROXY=<%= node['docker']['http_proxy'] %>"
<% end -%>
<% if node['docker']['no_proxy'] -%>
Environment="NO_PROXY=<%= node['docker']['no_proxy'] %>"
<% end -%>
<% if node['docker']['tmpdir'] -%>
Environment="TMPDIR=<%= node['docker']['tmpdir'] %>"
<% end -%>
Expand Down
6 changes: 6 additions & 0 deletions templates/default/docker.sysconfig.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ DOCKER_RAMDISK=<%= node['docker']['ramdisk'] %>
export HTTP_PROXY=<%= node['docker']['http_proxy'] %>
<% end -%>

# In case you need a proxy to hit a public index, but also need to hit a private
# index not accessible via the proxy, use no_proxy
<% if node['docker']['no_proxy'] -%>
export NO_PROXY=<%= node['docker']['no_proxy'] %>
<% end -%>

# This is also a handy place to tweak where Docker's temporary files go.
<% if node['docker']['tmpdir'] -%>
export TMPDIR="<%= node['docker']['tmpdir'] %>"
Expand Down
3 changes: 3 additions & 0 deletions templates/default/sv-docker-run.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export DOCKER_RAMDISK=<%= node['docker']['ramdisk'] %>
<% if node['docker']['http_proxy'] -%>
export HTTP_PROXY=<%= node['docker']['http_proxy'] %>
<% end -%>
<% if node['docker']['no_proxy'] -%>
export NO_PROXY=<%= node['docker']['no_proxy'] %>
<% end -%>
<% if node['docker']['tmpdir'] -%>
export TMPDIR=<%= node['docker']['tmpdir'] %>
<% end -%>
Expand Down

0 comments on commit f3e8d3c

Please sign in to comment.