Hi all,
I am trying to migrate from Portrainer to Composer, and I have a question about the network configuration.
Prior, in Portainer, this was my config:
Code
- [Portainer] Network Configuration
Endpoints: local
Networks: Add networks
Name: 192.168.1.x.[GW1].config
Driver: macvlan
Configuration
Parent network lan: eno1
Subnet: 192.168.1.0/24
Gateway: 192.168.1.1
>> Create the network
Networks: Add networks
Name: 192.168.1.x
Driver: macvlan
Configuration: 192.168.1.x.[GW1].config
>> Create the network
Alles anzeigen
... and I was using 192.168.1.x as the network in all my containers. Each with a different IP.
Now I'm trying to use this config, creating a file to each container:
Code
services:
pihole:
container_name: "pihole"
...
networks:
macvlan_network:
ipv4_address: 192.168.1.102
networks:
macvlan_network:
driver: macvlan
driver_opts:
parent: eno1
ipam:
driver: default
config:
- subnet: 192.168.1.0/24
ip_range: 192.168.1.102/32
gateway: 192.168.1.1
Alles anzeigen
Only with this container, all was fine. But when I try to add another container with same config (only changing ipv4_address and ip_range) it says: Error response from daemon: failed to allocate gateway (192.168.1.1). Address already in use
Any suggestions?
Thank you.
Regards,
Jubri.