Hi
I was wondering if someone could shed on the issue im having, currently i have this docker-compose which im trying to give my container crowdsec an static IP but i keep getting an error
ERROR: for c0572b64cb76_swag user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: for swag user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: Encountered errors while bringing up the project
It should work. How do you run the containers and what is the version of your Docker Compose? Is it on Linux (I guess it is), Windows or Mac? Is it Docker Desktop (probably not)?
It looks like you had two swag containers running. It happens sometimes when compose canât properly start the containers and starts one with a prefix like above. I donât exactly know why. I always just run docker-compose down and start the containers again.
thank you so much for the reply,
Correct i forgot to run docker-compose down
i re ran it
but still getting the issue
root@homelab:/swag# docker-compose up
Creating swag ... error
ERROR: for swag user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: for swag user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: Encountered errors while bringing up the project.
Are you trying to use the same ip range your local lan has?
As @rimelek already pointed out, it should work like this for the swag service, if this indeed is a network private to the docker engine. If you answer aboves question with yes, then it would explain why itâs not working - then you might want to use the search term âmacvlanâ in the forum serach.
⊠now imagine you would have shared in the first post WHY you want to give it a static ip⊠the whole thread wouldâve been way shorter.
Note: If you try to access another container by itâs internal ip, then itâs high likely it is something not ment to be done like that. DNS-based service discovery is there for a reasonâŠ