Skip to content

Commit

Permalink
feat(proxy): allow setting proxy in systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Dec 4, 2020
1 parent 7542beb commit ebeb2fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ docker:
name: docker-ce
service:
name: dockerd
env: null
suffix: tgz
commands:
- docker
Expand Down
1 change: 1 addition & 0 deletions docker/files/default/systemd.ini.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ WorkingDirectory={{ workdir }}
ExecStart={{ start }}
ExecStop={{ stop }}
PIDFile=/var/run/{{ name }}.pid
Environment={{ '' if not env else env }}

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions docker/software/archive/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
user: {{ d.identity.rootuser }}
group: {{ d.identity.rootgroup }}
workdir: {{ d.dir.lib }}
env: {{ d.pkg.docker.service.env }}
stop: ''
start: {{ d.pkg.docker.path }}/{{ d.pkg.docker.service.name }}
cmd.run:
Expand Down
2 changes: 2 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ docker:

pkg:
docker:
service:
env: HTTP_PROXY=http://YOUR_PROXY_IP_ADDRESS:PROXY_PORT
environ:
# yamllint disable-line rule:line-length
- OPTIONS='-s devicemapper --storage-opt dm.fs=xfs --exec-opt native.cgroupdriver=cgroupfs --selinux-enabled'
Expand Down

0 comments on commit ebeb2fe

Please sign in to comment.