Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port in docker registry url #57

Open
paleozogt opened this issue Sep 20, 2018 · 0 comments
Open

port in docker registry url #57

paleozogt opened this issue Sep 20, 2018 · 0 comments

Comments

@paleozogt
Copy link

Given a simple DockerMake.yml:

foobar:
    FROM: ubuntu:xenial

we can build prepend a Docker registry URL like this:

$ docker-make -r quay.io/elvis foobar
...
  docker-make built: quay.io/elvis/foobar

docker-make finished.
Built: 
 * quay.io/elvis/foobar

However, if the registry is running on a non-standard port it causes problems:

$ docker-make -r quay.io:5005/elvis foobar
...
Traceback (most recent call last):
  File "/usr/local/bin/docker-make", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/dockermake/__main__.py", line 38, in main
    run(args)
  File "/usr/local/lib/python2.7/site-packages/dockermake/__main__.py", line 88, in run
    built, warnings = utils.build_targets(args, defs, targets)
  File "/usr/local/lib/python2.7/site-packages/dockermake/utils.py", line 144, in build_targets
    pull=args.pull)
  File "/usr/local/lib/python2.7/site-packages/dockermake/builds.py", line 114, in build
    self.finalizenames(client, finalimage)
  File "/usr/local/lib/python2.7/site-packages/dockermake/builds.py", line 145, in finalizenames
    client.api.tag(finalimage, *self.targetname.split(':'))
  File "/usr/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/docker/api/image.py", line 532, in tag
    self._raise_for_status(res)
  File "/usr/local/lib/python2.7/site-packages/docker/api/client.py", line 231, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("invalid tag format")

But this is a valid registry URL as far as Docker is concerned:

$ docker tag quay.io/elvis/foobar quay.io:5005/elvis/foobar
$ docker images | grep elvis 
quay.io/elvis/foobar                latest              0b1edfbffd27        4 months ago        113MB
quay.io:5005/elvis/foobar           latest              0b1edfbffd27        4 months ago        113MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant