Page MenuHomeVyOS Platform

container: Container environment variable cannot be set
Closed, ResolvedPublicBUG

Description

The container environment variable is not set correctly. For example, when the HELLO environment variable is set in the config,

set container name abc environment HELLO value 'WORLD'

The create command of podman have no environment variable set.

podman inspect abc | jq '.[0].Config.CreateCommand'

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202309060638
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

fernando changed the task status from Open to Needs testing.Nov 8 2023, 7:52 PM
fernando added a subscriber: fernando.

I've tested this flag in both version 1.4 / 1.5 , it seems to work as expected :

vyos@vyos:~$ sudo podman inspect test  | jq '.[0].Config.CreateCommand'
  "--env",
  "TEST=123",
  "--label",
  "def=LABEL",

Could you confirm if it works for you @hlhc ?