IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
25.64k stars 1.39k forks source link

Add compose support for static IP addressing #1324

Open Dyson228 opened 1 year ago

Dyson228 commented 1 year ago

When using a MacVLAN network, there is an additional option that would support assigning a static IP address. In the yaml file it is:

Services: networks: [macVLAN Network]: ipv4_address: [static IP]

Currently, if I edit the existing docker-compose file to add this line CasaOS displays my app as "legacy", and I lose the ability to edit the compose settings through the web UI.

Additionally, this isn't working to give me a static IP address. I'm still troubleshooting that. I believe it may be related to compose version, but I haven't found what version compose CasaOS is using by default.

Right now, my alternative is to define a MacVLAN network with a /32 address, which I may do as this is likely the only contain I will have running on that VLAN. I do think having an entire VLAN defined as a network with a static IP is a cleaner solution though.

ETWang1991 commented 1 year ago

Got it

kingfish65 commented 8 months ago

Is there any update on macvlan support?

dimisc commented 8 months ago

Yes! Would love this functionality. I am setting a small server I can take with me when travelling. I want to set internal static IPs to my docker containers so that they are network agnostic and continue to function and communicate with each other when the server is connected to a new network with DHCP.

Dankni95 commented 6 months ago

Why isnt this yet possible?