bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

Parameter to clear all environment variables

Open valentindavid opened this issue 7 years ago • 4 comments

In our use case, we have a full environment defined for a container. We want to define only those and we do want to inherit any environment variable from host.

The current way to do it is to add --unsetenv parameters for every environment variable from host, before --setenv parameters.

This use case should be frequent enough for a --clearenv parameter to exist. This parameter would remove all environment variables. The command line would not need to depend on host environment variables.

valentindavid avatar Jul 30 '18 10:07 valentindavid

This should be straightforward to implement. Are you intending to submit a merge request for this?

smcv avatar Jul 30 '18 13:07 smcv

I was not intending to, unless nobody does it. Go ahead if you want.

valentindavid avatar Jul 30 '18 13:07 valentindavid

In our use case, we have a full environment defined for a container. We want to define only those and we do want to inherit any environment variable from host.

what about "env -i" before invoking bwrap?

toralf avatar May 09 '20 18:05 toralf

PR #401 added a --clearenv option, which was released in v0.5.0. I think this issue can be closed.

ongardie avatar Jun 14 '22 23:06 ongardie