Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

docker-compose.yml with "network_mode: host" #197

Open
squromiv opened this issue Apr 25, 2021 · 4 comments
Open

docker-compose.yml with "network_mode: host" #197

squromiv opened this issue Apr 25, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@squromiv
Copy link

I added "network_mode: host" do docker-compose file. After that
screen_2021 04 25
Ok. Deleted section with ports
screen_2021 04 25
And rerun docker-compose
screen_2021 04 25
So what next?

@squromiv squromiv changed the title docker-compose with "network_mode: host" docker-compose.yml with "network_mode: host" Apr 25, 2021
@b-m-f
Copy link
Owner

b-m-f commented Apr 26, 2021

Can you try to delete that line with disable_ipv6.

I think this only works when using docker networking.

If that is the case I am going to update the documentation.

@squromiv
Copy link
Author

Can you try to delete that line with disable_ipv6.

Of course, I did it. The result is unpromising. Take a look at screenshot, please.

@b-m-f
Copy link
Owner

b-m-f commented Apr 26, 2021

Yup. Looks like port 53 is already in use on your host machine.

Nothing to be done on the project side.

But I will add the above mentioned fix to the documentation!

@b-m-f b-m-f added the documentation Improvements or additions to documentation label Apr 26, 2021
@squromiv
Copy link
Author

squromiv commented Apr 26, 2021

Looks like port 53 is already in use on your host machine.

Perfectly. I`ve found out, that it is used by "systemd-resolved". So we need to free it up.

Finally, in order to use "network_mode: host" in docker-compose file, we need

  1. to delete these strings:
ports:
    - 53:53
    - 80:80
    - 3030:3030
    - 10101:10101/udp
 sysctls:
     - net.ipv6.conf.all.disable_ipv6=0
  1. to free up port 53, used by another service by default in Ubuntu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants