Skip to content

Docker compose pull should not pull image that's overrided with build option #3673

@kscc25

Description

@kscc25

Scenario: I have two compose files

The base one is docker-compose.yml:

version: '2'

services:
  webapp:
    image: hello-world
  redis:
    image: redis:latest

The extended one is docker-compose.override.yml to override webapp service with build option:

version: '2'

services:

  webapp:
    extends:
      file: docker-compose.yml
      service: webapp
    build:
      context: .
  redis:
    extends:
      file: docker-compose.yml
      service: redis

The command I run:

docker-compose -f docker-compose.override.yml pull

Actualy result: both hello-world and redis images are pulled

Expected result: only redis image is pulled because the hello-world image is eventually built later with docker-compose build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions