Skip to content

RemoveNonTaggedImages is not working because image gets latest tag when not specified #190

@szczepq

Description

@szczepq

I'm not specifying a tag for my image in docker-compose.yml

version: "3.4"

services:
  my-api:
    image: my.api
    build:
      context: my.API
      dockerfile: Dockerfile
    ports:
      - "5005:80"

After running builder with docker-compose.yml file like this

            _compositeService = new Builder()
                .UseContainer()
                .FromComposeFile(dockerComposePath)
                .RemoveOrphans()
                .RemoveNonTaggedImages()
                .ForceBuild()
                .WaitForHttp("my-api", $"{confirmUrl}/courses",
                    continuation: (response, _) => response.Code != HttpStatusCode.OK ? 5000 : 0)
                .Build()
                .Start();

my image my-api has tag latest

so RemoveNonTaggedImages() which is adding --rmi local to docker-compose down is not removing this image.

Metadata

Metadata

Assignees

Labels

under-investigationA investigation is made around the issuewaiting-for-feedbackWaiting for someone to give feedback until this issue can be brought further.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions