Before with Ubuntu Server + Docker everything just had the 192.168.68.211
![Big Grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ockerporthere for my applications and it was easy to remember.
That's because Docker handles such things
automagically for you, usually; if you're just running containers without extra network configuration, it will use its default bridge network using
the bridge network driver. Basically, it puts your containers in a separate virtual network by default and makes your host the gateway to your actual, (presumably) physical network.
Now with LXC's and VM's, everytime I create one I get a new random IP which just keeps confusing me.
I'm going to simplify a lot of things for the sake of explanation, but it
kind of works like this:
Because virtual machines are just "computers inside a computer" they also require
virtual hardware. So instead of the VM having a physical network interface, it has a
virtual network interface - a program that acts like the physical world's counterpart. The operating system that you install in the VM usually doesn't notice any difference, it will just see it as another piece of hardware, even though it's virtual. Containers are a little different from that; regardless, the virtual machine will still need its own IP address if it wants to talk to other hosts or the internet.
Same thing happens with Docker containers, except that Docker makes that a little less explicit. (Unless you tell your Docker containers to use the host's network, that is.) Docker containers still need their own IP address, too.
You probably know this already anyway, but you get my point.
So, if you want to achieve mostly the same behaviour as Docker does, have a look at the
Routed Configuration section in our documentation:
https://pve.proxmox.com/wiki/Network_Configuration
You can also configure that via the GUI, of course.
Note that you still might need DHCP / DNS inside the virtual network, so you'll have to set that up yourself as well.
At first I didn't change the gateway and left it blank as I just wanted the specific IP address but noticed I wasn't getting any internet connection, then I added the gateway address.
Have a look at this:
https://en.wikipedia.org/wiki/Gateway_address