I believe we already do expose the address in the environment, but need to check what that is.
As for /etc/hosts
— we do that now! The general sequence of events is:
-
A container image is built, either on your side and pushed to our container repository, or on ours.
-
When an instance is deployed, on demand, we convert the layers of the container image to a rootfs for Firecracker.
-
We then inject things into that rootfs —
/etc/hosts
and/etc/resolv.conf
included. -
We start the VM.
-
The VM runs our
init
, which sets up interfaces. -
init
calls your entrypoint.
(Steps 3 and 5 might have been swapped lately, because Jerome is tinkering with how we build rootfs’s to make VMs boot faster, but the effect is the same).
I await Jerome’s corrections.