shinebayar-g / ufw-docker-automated

Manage docker containers firewall with UFW!
Apache License 2.0
198 stars 31 forks source link

Couldn't detect the container IP address. #58

Closed florie1706 closed 1 year ago

florie1706 commented 1 year ago

Hi @shinebayar-g ,

I am on Ubuntu 23.10 and I changed from the built-in version of docker-compose (which was 1.29.1) to the latest version 2.22.0

With that version of docker-compose I had to change some of my compose files regarding external networks:

old content:

networks:
    traefik_proxy:
      external:
        name: traefik_proxy

new content:

networks:
    traefik_proxy
      external: true

I do not know if this is the "problem", but now ufw-docker-automated does not create the rules but throws this error:

ERR create.go:36 > ufw-docker-automated: Couldn't detect the container IP address.

Anything I could do? Could this be the problem, that ufw-docker-automated can not read the container IP?

shinebayar-g commented 1 year ago

Hey @florie1706 sorry for the late response, was this resolved?

florie1706 commented 1 year ago

Hi @shinebayar-g, thank you for your response. I just built ufw-docker-automated for the latest code (including #51 ) and I don't know why, but with this included it runs again ;) I had two networks in that specific yaml file, maybe that was a reason ...

shinebayar-g commented 1 year ago

Ah that must be it then, glad it worked.