@ -168,7 +168,7 @@ You have 4 available objects in your templates.
- `config`
- `links`
- `containers`
- `environ`
- `env`
#### config
@ -213,7 +213,10 @@ You have 4 available objects in your templates.
- Tuple of `link` object related to this container
#### environ
`env` is the environment of the container (os.environ).
`environ` is the environment of the container (os.environ).
`env` is an alias to `environ`.
## Setup
@ -54,6 +54,7 @@ class Entrypoint(object):
f.write(temp.render(config=self.config,
links=self.config.links,
env=os.environ,
environ=os.environ,
containers=DockerLinks().to_containers()))
def run_conf_cmd(self, cmd):
@ -137,6 +137,10 @@ def test_templates():
for id in test['ID']:
int(id, base=16)
# test env
assert test['ENV']['SECRET'] == 'nothing'
assert test['ENVIRON']['SECRET'] == 'nothing'
def test_conf_commands():
entry = Entrypoint(conf='configs/base.yml')
@ -42,3 +42,13 @@ ID:
{% for container in containers %}
- {{container.id}}
{% endfor %}
ENV:
{% for e in env %}
{{e}}: {{env[e]}}
ENVIRON:
{% for e in environ %}