[elbe-devel] Howto add a local apt-cacher to initvm?

ew.foe at nassur.net ew.foe at nassur.net
Mon May 23 09:38:41 CEST 2022


Good Morning!

Quoting John Ogness <john.ogness at linutronix.de>:

> Hi Erich,
>
> On 2022-05-20, ew.foe at nassur.net wrote:
>> I would like to advise initvm in such a way, that it would be using a
>> locally available apt-cacher-ng for downloads.
>
> I do these 2 things to achieve this:
>
> 1. Before doing any elbe commands, I export the "http_proxy" environment
> variable:
>
> export http_proxy="http://192.168.42.42:8888"

Well, this breaks elbe downloading preseed files and the like.
Which is not surprising really, because the apt cacher cannot
handle requests other than apt asking for a deb package file.

>
> 2. In the XML file for the target image I add the "primary_proxy"
> element (right after "primary_proto"):
>
>        ...
>        <primary_proto>http</primary_proto>
> +      <primary_proxy>http://192.168.42.42:8888</primary_proxy>
>        <url-list>
>        ...

I found the --proxy Option in "elbe-initvm" documentation. So I tried that
instead of editing the .xml file.

Building the initvm does not leave traces in the log of apt-cacher.
Building the target image does.

>
> John Ogness

In the long run I would like to be able to build target images with elbe
while "on an island", i.e. disconnected from the internet. I know, that
I need a (partial) mirror of the debian repository, but what else? And
is this a feasible use case? Are others pursuing this direction as well?

Thanks,
Erich




More information about the elbe-devel mailing list