Adguard synology2/14/2024 It only needs to be specified once at the top of each file.ĭocker compose requires a configuration file that is in YAML format. This is the only version that seems to support specifying MAC and IP addresses which to me is very handy. Note: I’m using version 2 of the docker compose format. I now use this to create all my containers that I run but in this example we will focus on Pi-Hole. Luckily docker comes with a way to automate this setup with the command docker-compose. I quickly became fed up of clicking around the docker UI to create containers, update containers and to modify them. I’m quite a lazy guy when if comes to repitition. Making things easier using docker compose This is so that we can restrict the IP addresses docker uses so not to clash with our physical machines see IP calculator. Note: The IP address range in the above command of 192.168.123.192 / 28 might appear strange. If you use any of the downloaded files please update these entries to your specific network. In all my examples I will be using the network 192.168.123.0/24. This will then appear to be directly connected on our host network but will have it’s own IP and therefore all network ports available.Ī new network can be easily created using the following command (but hold off, we’ll go into actually doing this later using configuration files) So the idea is that we will create our own docker network using the macvlan driver, this will then allow us to connect our Pi-Hole container onto this network which will assign it it’s own MAC. In this type of situation, you can use the macvlan network driver to assign a MAC address to each container’s virtual network interface, making it appear to be a physical network interface directly connected to the physical network. Some applications, especially legacy applications or applications which monitor network traffic, expect to be directly connected to the physical network. Macvlan is a network driver provided by Docker, the following is an extract from the documentation If your names is using IP x.x.x.199 then please change the above! Using macvlan for networking Continue reading to understand (hopefully!) If it all works Pi-Hole will be running on IP.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |