I’m having problems using a different sources.list in my ubuntu container than the original.
I have added an /etc/apt/sources.list.d/sources.list inside the container after boot, but when I run apt-get update the original /etc/apt/sources.list take precedence.
This is ultimately what I’m trying to solve and I thought I’d do that by configuring the apt primary uri as mentioned in cloud-init. Nothing I do seems to work though.
Note that cloud-init only runs on the first boot of the container, so with the commands above, you’re likely setting it too late. You could use lxc init instead of lxc launch, then run lxc start.
Or you could put the cloud-init bits in your default profile, so that they apply to all containers spawned on your system. If you do so, you may want to use the user.vendor-data key instead of user.user-data as that will then let you still use user.user-data for any container-local configuration.
The apt_mirror config key doesn’t really match any cloud-init documentation I could find anyway.
Mind me asking where this comes from and how you know?