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

Cannot docker up using an image name that does not match the default project_service format #1315

Closed
niallmccullagh opened this issue Apr 20, 2015 · 3 comments

Comments

@niallmccullagh
Copy link

To run compose using only a pre-built image that does not match the projectName_service tag fails. However passing a project name in the -p flag that does not match the default name works.

Declaration in docker-compose.yml:

api:
  image: example/appname
 …

Output when running docker-compose up

docker-compose up
Recreating appname_api_1...
No such image: appname_api:latest (tag: latest)

Works oddly when specifying -p flag with project name that does not match the default project name

docker-compose -p someothername up
Creating someothername_api_1...
Attaching to someothername_api_1

There should be no need to pass a project name to docker-compose up for this to work

@dnephin
Copy link

dnephin commented Apr 20, 2015

I believe this may be related to #874, what happens if you do docker-compose rm api first? (that way it will "create" instead of "recreate" the container.

@niallmccullagh
Copy link
Author

Thanks @dnephin, that worked. Closing issue.

@lrkwz
Copy link

lrkwz commented Nov 21, 2015

@dnephin yous saved hours of my life.
Probabily the error message can be some clear on how to solve the problem.
Mine was:

~/p/f/s/m/docker> docker-compose up                                                                                                             master-!?
docker_fidelio-application_1 is up-to-date
docker_fidelio-db_1 is up-to-date
Recreating f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_docker_fidelio-maven_1
ERROR: No such image: 188696c848ab8404622d52aad12ce1cb68278eb50f294f1f2e19d60ad9be9539
~/p/f/s/m/docker> docker-compose rm fidelio-maven                                                                                               master-!?
Going to remove f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_docker_fidelio-maven_1
Are you sure? [yN] y
Removing f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_f538fe9800_docker_fidelio-maven_1 ... done
~/p/f/s/m/docker> docker-compose up                                                                                                             master-!?
docker_fidelio-application_1 is up-to-date
docker_fidelio-db_1 is up-to-date
Creating docker_fidelio-maven_1
Attaching to docker_fidelio-application_1, docker_fidelio-db_1, docker_fidelio-maven_1
(...)

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

3 participants