LXDInstanceProvider does not pass proxy information to lxc exec
Bug #1826481 reported by
Bryon Nevis
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
In order to facilitate building in an lxd container behind a firewall, it should be possible to pass proxy variables (http_proxy, https_proxy, no_proxy) that are defined as part of the lxd core configuration to the lxc exec command. Note entirely sure this will fix the whole issue, because the snapcraft squashfs makes it difficult to overwrite the file to test the fix, but this seems like part of the issue.
class LXDInstanceProv
"""Provide the minimal Provider methods to be able to use the SnapInjector.
"""
...
def run(self, command: Sequence[str], hide_output: bool = False):
cmd = ["lxc", "exec", self._instance_
Can't snapcraft just look at environment variables ($http_proxy, $https_proxy) and pass them along in the container configuration?