Compose: Regression: build and image no longer work together

Created on 6 Jan 2020  路  1Comment  路  Source: docker/compose

in docker-compose < 1.25 it worked to define build and image labels together and by default pull the pre-built image, but also allow to build it locally.

this functionality no longer works with docker compose 1.25 (buildkit or no buildkit) mode

version: "3.6"

services:
  app:
    # having "image" and "build" allows to use pre-defined image and also issue build command locally
    image: gitlab.example.net:4567/app:latest
    build: .

it was very convenient for start developing project (pre-built image is pulled), but also convenient to update image locally (just invoke docker-compose build).

now having both defined docker-compose pull does nothing, expected be it to pull image defined in image label.

duplicate kinbug

Most helpful comment

This is a known issue in 1.25.0, fixed by 1.25.1 (rc1 available, final release to happen in a few)

see https://github.com/docker/compose/pull/7039

>All comments

This is a known issue in 1.25.0, fixed by 1.25.1 (rc1 available, final release to happen in a few)

see https://github.com/docker/compose/pull/7039

Was this page helpful?
0 / 5 - 0 ratings