Skip to content

[Bug]: env-file option does not support reading from named pipes #956

Closed

Description

@asgeirn

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

A common trick to protect secrets is to use named pipes as files to pass environment variables or other secrets to a process.

In bash and zsh, this is achieved by i.e. --env-file <(echo ACCESS_KEY=secret) -- and tools like 1Password do this for environment secrets.

This works just fine for podman, but container run throws the following error:

> ls -l .env
prw-------@ 1 asgeir.nilsen  staff  0 Dec 16 09:15 .env
> container run -it --rm --env-file .env containerimage:latest
Error: invalidArgument: "failed to read envfile at .env"
> container run -it --rm --env-file <(cat .env) containerimage:latest
Error: invalidArgument: "failed to read envfile at /dev/fd/11"

Current behavior

Error: invalidArgument: "failed to read envfile at /dev/fd/11"

Expected behavior

.env file is read as expected

Environment

- OS: macOS 26.2 (25C56)
- Xcode: xcode-select version 2416.
- Container: container CLI version 0.7.1 (build: release, commit: 420be74)

Relevant log output

N/A

Code of Conduct

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

Activity

  1. added theissue type on Dec 16, 2025
  2. Bortnyak commented on Dec 16, 2025

    @Bortnyak
    Contributor

    Hey. I want to contribute if nobody has already started working on it.

  3. dcantah commented on Mar 22, 2026

    @dcantah
    Contributor

    Closed via #974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions