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

Automatic image naming is weird, change it or provide explicit naming option #1363

Closed
ghost opened this issue Apr 28, 2015 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented Apr 28, 2015

I have the following docker-compose.yml:

nginx:
  build: .
  ports:
   - "80:80"

.. along with this Dockerfile in the same directory:

FROM ubuntu

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y nginx

CMD nginx && tail -f /dev/null

Now if I do "docker-compose up", I get the following image entry:

jonas@cyberman#11: docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
nginx_nginx                        latest              70d6fcf2fc2c        29 minutes ago      261.1 MB

"nginx_nginx"? Really? You couldn't just use "nginx" as I named it?
If you really want to have such weird naming schemes, at least let me override it with a proper name.

@aanand
Copy link

aanand commented Apr 28, 2015

Duplicate of #652. In summary: yes, it's annoying, but for now we rely on the naming scheme to keep track of containers. In the next version we're going to switch to using labels (see #1356) and then it'll be possible to implement support for custom container names.

@Grokzen
Copy link

Grokzen commented Sep 14, 2015

@aanand Any plans to change the naming scheme in the near future via some new options or flags?

A new option in compose.yml for image_name similar to container_name that was implemented would be really nice to have.

@dnephin
Copy link

dnephin commented Sep 14, 2015

I think to do this properly we'd want #1403, but that isn't currently possible with docker labels.

Instead of customizing the name, I think I would rather support some way of re-tagging the image to different names (something like #213). That way the "internal" names are consistent, but you can alias the image as anything you want for "external" use.

@bfirsh
Copy link

bfirsh commented Sep 24, 2015

Thanks for the suggestion, @Jonast. This is covered by #213, as @dnephin suggests, and I have also created #2092 to more formally propose this feature.

@bfirsh bfirsh closed this as completed Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants