Skip to content

[Bug]: container build not using context-dir #782

@0xEDU

Description

@0xEDU

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. Run build with any other path: container build ..
  2. If there's Dockerfile in the current path, it will build it. If there's not a Dockerfile, it will throw:
    Error: Dockerfile does not exist at path: Dockerfile

Current behavior

The build command does ignores the context-dir passed to it, it builds the Dockerfile it finds at the current path or throw an error if there is none.

Expected behavior

build should use the argument path as the context directory instead of always using the current path.

Environment

- OS: 26.0.1
- Xcode: 26.0.1 (25A362)
- Container: container CLI version 0.5.0

Relevant log output

Error: Dockerfile does not exist at path: Dockerfile
Usage: container build [<options>] [<context-dir>]
  See 'container build --help' for more information.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions