Compose: `docker-compose pull` should pull base images for built containers

Created on 25 Jan 2016  路  2Comments  路  Source: docker/compose

Say you have a docker-compose.yml like:

one:
  image: python
two:
  build: .

And a Dockerfile like:

FROM ruby
...

I'd expect docker-compose pull to pull both python and ruby images. Only python is currently pulled.

arebuild

Most helpful comment

You can use docker-compose build --pull to have it pull the base images.

It's not possible to have docker-compose pull pull the base images because there is no way to query docker for "give me the base image of this Dockerfile".

Maybe if/when the builder is extracted from the daemon and moved into the client there may be some way to do this, but even then I'm not sure it makes sense.

I think the current behaviour is correct.

All 2 comments

You can use docker-compose build --pull to have it pull the base images.

It's not possible to have docker-compose pull pull the base images because there is no way to query docker for "give me the base image of this Dockerfile".

Maybe if/when the builder is extracted from the daemon and moved into the client there may be some way to do this, but even then I'm not sure it makes sense.

I think the current behaviour is correct.

Sorry, I did not know that option. Seems legit.

Was this page helpful?
0 / 5 - 0 ratings