Skip to content

unrecognized arguments: --no-hosts #1447

@Hount

Description

@Hount

Describe the bug
--no-hosts commandline parameter is not working.

To Reproduce
podman compose up --no-hosts

Expected behavior
Identical behaviour as having no_hosts=false in containers.conf
as per documentation: https://github.com/containers/common/blob/main/docs/containers.conf.5.md
This was added after a issue report #1056
And fixed in #1060
Based on quick code-search the
if cnt.get("x-podman.no_hosts", False): podman_args.extend(["--no-hosts"])

Section is still intact. But something else is preventing --no-hosts -usage.

Actual behavior
podman-compose: error: unrecognized arguments: --no-hosts Error: executing /usr/bin/podman-compose up --no-hosts: exit status 2

Output
podman-compose: error: unrecognized arguments: --no-hosts Error: executing /usr/bin/podman-compose up --no-hosts: exit status 2

$ podman-compose version
podman-compose version 1.5.0
podman version 5.8.1

$ podman version
Client:        Podman Engine
Version:       5.8.1
API Version:   5.8.1
Go Version:    go1.25.7 X:nodwarf5
Git Commit:    c6077f645788743258a1a749f8005b4fb3cbe533
Built:         Wed Mar 11 02:00:00 2026
Build Origin:  Fedora Project
OS/Arch:       linux/amd64

Environment:

  • OS: Linux
  • podman version: 5.8.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