diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-10-03 23:41:13 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-10-03 23:41:13 +0200 |
| commit | 94dc825c2cb30b696f3f120504e335e2d3a5dac8 (patch) | |
| tree | e08e28f2c97945e7b6485a0d582074cff6e4692f | |
| parent | 0dfe69c0ca347ab237d13d61ae63fe49a804d1a7 (diff) | |
Experimental support for specifying a docker hub repo.
| -rwxr-xr-x | cdist | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -106,6 +106,7 @@ class Config: Option('osx_sdk_prefix'), Option('osx_sdk'), BoolOption('docker_sudo'), + Option('docker_hub_repository'), Option('flatpak_state_dir'), Option('parallel', 4) ] @@ -521,7 +522,12 @@ class DockerTarget(Target): opts += '--privileged=true ' if self.ccache: opts += "-e CCACHE_DIR=/ccache --volumes-from ccache-%s" % self.image - self.container = command_and_read('%s run -u %s %s -itd %s /bin/bash' % (config.docker(), getpass.getuser(), opts, self.image)).read().strip() + + tag = self.image + if config.has('docker_hub_repository'): + tag = '%s/%s' % (config.get('docker_hub_repository'), tag) + + self.container = command_and_read('%s run -u %s %s -itd %s /bin/bash' % (config.docker(), getpass.getuser(), opts, tag)).read().strip() def command(self, cmd): dir = os.path.join(self.directory, os.path.relpath(os.getcwd(), self.directory)) |
