opencontainers / opencontainers/runc

--env doesn't work when --process process.json is used

Open
#3,241 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

Is it possible to use both --env and --process flags when running runc? I noticed that when --process is used (I have env variables defined in json file), env variables defined after --env are ignored (I don't see them inside a container. I see only env variables defined in json file). Is it expected behavior? I think it should be possible to define env variables both in json file and with --env option.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the runc invocation with both --env and --process process.json, comparing the container environment with the variables defined in each source. Trace how the CLI combines process.json values with --env values; done means variables from both are present, with the intended precedence documented or covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.