Skip to content
Snippets Groups Projects
Commit a2ff53d8 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Bugfix in inferring image tag from image name.

parent 93f363c0
Branches
No related tags found
No related merge requests found
...@@ -789,7 +789,13 @@ def get_or_create_container_from_repository(user, repository_url, repository_tag ...@@ -789,7 +789,13 @@ def get_or_create_container_from_repository(user, repository_url, repository_tag
# Set image registry, name and tag. Use "strip()" as sometimes the newline chars might jump in. # Set image registry, name and tag. Use "strip()" as sometimes the newline chars might jump in.
registry = get_platform_registry() registry = get_platform_registry()
image_name = repository_name.lower().strip() image_name = repository_name.lower().strip()
image_tag = repo2docker_image_name[-7:] # The last part of the image name generated by repo2docker is the git short hash if repo2docker_image_name.endswith(':latest'):
# Not clear why sometimes this happens. maybe if an existent image gets reused?
image_name_for_tag = repo2docker_image_name.replace(':latest','')
else:
image_name_for_tag = repo2docker_image_name
image_tag = image_name_for_tag[-7:] # The last part of the image name generated by repo2docker is the git short hash
# Re-tag image taking into account that if we are using the proxy as registry we use localhost or it won't work # Re-tag image taking into account that if we are using the proxy as registry we use localhost or it won't work
if registry == 'proxy:5000': if registry == 'proxy:5000':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment