Add Dockerfile repo2docker labels

pull/500/head
James Bourbeau 2018-12-12 22:05:06 -06:00
rodzic eb272875b1
commit 2e31e6e80e
2 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -745,6 +745,11 @@ class Repo2Docker(Application):
picked_buildpack = self.default_buildpack()
picked_buildpack.appendix = self.appendix
picked_buildpack.labels = {
'repo2docker.version': self.version,
'repo2docker.repo': self.repo,
'repo2docker.ref': self.ref,
}
self.log.debug(picked_buildpack.render(),
extra=dict(phase='building'))

Wyświetl plik

@ -120,8 +120,8 @@ ENV {{item[0]}} {{item[1]}}
# Container image Labels!
# Put these at the end, since we don't want to rebuild everything
# when these change! Did I mention I hate Dockerfile cache semantics?
{% for k, v in labels.items() -%}
LABEL {{k}}={{v}}
{% for k, v in labels.items() %}
LABEL {{k}}="{{v}}"
{%- endfor %}
# We always want containers to run as non-root
@ -246,7 +246,7 @@ class BuildPack:
"""
Docker labels to set on the built image.
"""
return {}
return getattr(self, 'labels', {})
def get_build_script_files(self):
"""