"docker-compose" does not allow to allow or build from local images

I have been trying for the last two days to get a little editing in a Dockerfile tested in a multi-container set that uses docker-compose .

I can create and tag the container locally, but as soon as I started docker-compose, I pulled it out of the registry copy (contrary to the documentation for the docker documentation).

If I run docker build . in the directory itself, the container will be found correctly, but the execution of the "docker-build build" will fail.

 bash-3.2$ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE busbyjon/heroku-php latest c6c60910a924 58 minutes ago 1.754 GB mysql latest d7da97aedce5 3 days ago 324.3 MB heroku/cedar 14 ef12eade669a 2 weeks ago 1.265 GB bash-3.2$ docker-compose build cleardb uses an image, skipping Building shell... Step 0 : FROM busbyjon/heroku-php Pulling repository docker.io/busbyjon/heroku-php Service 'shell' failed to build: Error: image busbyjon/heroku-php:latest not found 

Please note that busbyjon/heroku-php displayed as an image but not found. It doesn't seem to matter that I marked this image as (it could be a "test", and it still doesn't work!).

Please, help!

+7
docker docker-compose
source share
2 answers

I managed to overcome a similar problem by marking my image as follows:

  • myservice or local/myservice

This did not work for me:

  • my-service

This may not be the reason .. but try removing the dash from your image tag. To repeat the image run: docker tag busbyjon/heroku-php herokuphp and then use the herokuphp image herokuphp in docker-compose.yml

+2
source share

Probably due to this error: https://github.com/docker/compose/issues/1568 (could not find a locally built image)

+1
source share

All Articles