Skip to content

Commit c5922a9

Browse files
author
Matthew Fisher
committed
fix(controller): tack on host/port to image id
With the changes to how we store images in the controller, we stripped the host/port from the image. We must add it back if we want to pull it from the registry.
1 parent a3db96e commit c5922a9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

controller/api/tasks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ def stop_containers(containers):
7979
def run_command(c, command):
8080
release = c.release
8181
version = release.version
82-
image = release.image
82+
image = '{}:{}/{}'.format(settings.REGISTRY_HOST,
83+
settings.REGISTRY_PORT,
84+
release.image)
8385
try:
8486
# pull the image first
8587
rc, pull_output = c.run("docker pull {image}".format(**locals()))
8688
if rc != 0:
87-
raise EnvironmentError('Could not pull image: {pull_image}'.format(**locals()))
89+
raise EnvironmentError('Could not pull image: {image}'.format(**locals()))
8890
# run the command
8991
docker_args = ' '.join(['--entrypoint=/bin/sh',
9092
'-a', 'stdout', '-a', 'stderr', '--rm', image])

0 commit comments

Comments
 (0)