Skip to content

compose spec build spec "dockerfile" attribute being ignored #1312

@mr-andres-carvajal

Description

@mr-andres-carvajal

Describe the bug
The container spec build spec attribute "dockerfile" is being ignored: https://github.com/compose-spec/compose-spec/blob/main/build.md#dockerfile

Only "Dockerfile" and "Containerfile" are supported

To Reproduce

services:
  postgres:
    build:
      context: postgres
      dockerfile: Containerfile.custom

The above should work, but only works if the dockerfile is named "Dockerfile" or "Containerfile"

When running podman-compose up

The error is:

Error: no Containerfile or Dockerfile specified or found in context directory, {CONTEXT}: The system cannot find the file specified. ERROR:podman_compose:Build command failed

Expected behavior
Any custom Dockerfile name should be allowed

Actual behavior
Will only work if the Dockerfile is named "Dockerfile" or "Containerfile"

Environment:

  • OS: WSL
  • podman version: 5.6.1
  • podman compose version: 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions