buildroot: set container env variable
Set the container environment variable to indicate to programs inside the build root that they are indeed running inside a container (see also https://systemd.io/CONTAINER_INTERFACE/).
This commit is contained in:
parent
0c71289067
commit
c825c7e4fa
2 changed files with 2 additions and 0 deletions
|
|
@ -275,6 +275,7 @@ class BuildRoot(contextlib.AbstractContextManager):
|
|||
|
||||
# Setup a new environment for the container.
|
||||
env = {
|
||||
"container": "bwrap-osbuild",
|
||||
"LC_CTYPE": "C.UTF-8",
|
||||
"PATH": "/usr/sbin:/usr/bin",
|
||||
"PYTHONPATH": "/run/osbuild/lib",
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ def test_env_isolation(tempdir):
|
|||
|
||||
allowed = [
|
||||
"_", # added by `env` itself
|
||||
"container",
|
||||
"LC_CTYPE",
|
||||
"PATH",
|
||||
"PWD",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue