AdGuard-WireGuard-Unbound-DNScrypt icon indicating copy to clipboard operation
AdGuard-WireGuard-Unbound-DNScrypt copied to clipboard

Docker version

Open godshades opened this issue 3 years ago • 277 comments

Hi, thanks for a great project Would you mind if make a docker version of this pj Or tutorial how to use with adguard (docker)

godshades avatar Jan 13 '22 07:01 godshades

Thanks.. my plan was to make these projects more understandable and get it working, I thought about building a docker container at some point , I know it is super easy but for a while I'm focus on my app development and not planning to make one now for there is a lot of guides on docker and these projects.

But the whole idea of this repo was for people to understand this network stuff better and other people to contribute to make it better so I will create a help issue for a docker image if anyone is interested. 🙏🙏🙏

trinib avatar Jan 13 '22 17:01 trinib

Thanks to your great work I was able to set up a Docker with all the stuff except the VPN. It is installed on my raspberry via the PiVPN script. I'm going to continue an observation phase to see if everything works well and I'll publish my Docker.

oijkn avatar Apr 01 '22 16:04 oijkn

In my case I don't need to use a VPN in a docker. So at first I will share my work without this option. On the other hand I use OpenVPN because with a PC that does not have administrator rights it works while with Wireguard it is not the case even if it is faster.

oijkn avatar Apr 05 '22 16:04 oijkn

Hi @trinib,

Sorry for the wait but I was busy with other personal projects. Good news ! The Docker version is online and available here : https://hub.docker.com/r/oijkn/adguardhome-doh-dot

If you have any comments or questions don't hesitate to open an issue or to contact me.

Thanks again for your great work and sharing :)

oijkn avatar May 23 '22 19:05 oijkn

@oijkn thanks I'll try it out in a while

trinib avatar May 23 '22 20:05 trinib

Hi @trinib,

Sorry for the wait but I was busy with other personal projects. Good news ! The Docker version is online and available here : https://hub.docker.com/r/oijkn/adguardhome-doh-dot

If you have any comments or questions don't hesitate to open an issue or to contact me.

Thanks again for your great work and sharing :)

hi @oijkn i try to deploy that but i get in trouble for now i have my macvlan with name 'mymacvlanexist' how should i connect that to that 'mymacvlanexist' instead of create new one?

i think i should change this two part to connect network to 'mymacvlanexist' , but i don't know how.

    networks:
      macvlan0:
        ipv4_address: 192.168.1.110                                    # IP of the container for AdGuardHome, configure it to your needs

and

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0                                                     # Parent interface, configure it depending on your interface name
    ipam:
      config:
        - subnet: 192.168.1.0/24                                       # Subnet of the container
          gateway: 192.168.1.1                                         # Gateway of the network
          ip_range: 192.168.1.100/28                                   # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.100                                     # Reserved for RPi Server (IP of the host)

Monirzadeh avatar May 24 '22 00:05 Monirzadeh

@Monirzadeh can you list your network with : docker network ls and then show me detail with docker network inspect <network_name> ?

oijkn avatar May 24 '22 10:05 oijkn

@oijkn Everything installed ok but this keeps happening(restarting)

image

Using Pi raspberry 64bit, installed docker for debian from https://docs.docker.com/engine/install/debian/

~It stated clone repo to docker data directory. I used location /var/lib/docker/ 🤷‍♂️ and I needed to be in sudo su root privilege mode~ You meant in docker-compose.yml. 😅

~I did not change anything in file~. I kept 192.168.1.110. My network has a [192.168.100.xxx] type address, do not know if that means anything

for nameserver in /etc/resolv.conf, 192.168.1.110 gets removed after restart so I used this guide : https://www.tecmint.com/set-permanent-dns-nameservers-in-ubuntu-debian/

BTW you have docker-compose up -d when docker compose up -d is the working command for me

let me know if you see what I did wrong

EDITED

crap I did not set path in volumes section 😅

trinib avatar May 24 '22 11:05 trinib

hi @oijkn i try to deploy that but i get in trouble for now i have my macvlan with name 'mymacvlanexist' how should i connect that to that 'mymacvlanexist' instead of create new one?

i think i should change this two part to connect network to 'mymacvlanexist' , but i don't know how.

    networks:
      macvlan0:
        ipv4_address: 192.168.1.110                                    # IP of the container for AdGuardHome, configure it to your needs

and

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0                                                     # Parent interface, configure it depending on your interface name
    ipam:
      config:
        - subnet: 192.168.1.0/24                                       # Subnet of the container
          gateway: 192.168.1.1                                         # Gateway of the network
          ip_range: 192.168.1.100/28                                   # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.100                                     # Reserved for RPi Server (IP of the host)

did you ran docker pull oijkn/adguardhome-doh-dot first ? cause when i did i got that error

trinib avatar May 24 '22 11:05 trinib

@Monirzadeh can you list your network with : docker network ls and then show me detail with docker network inspect <network_name> ?

NETWORK ID     NAME        DRIVER    SCOPE
randomnumber1   MacConfig   null      local
randomnumber2   MyMacVlan   macvlan   local
randomnumber3   bridge      bridge    local
randomnumber4   host        host      local
randomnumber5   none        null      local

inspect that not contain Adgurde but some container connect to this macvlan docker network inspect MyMacVlan output

[
    {
        "Name": "MyMacVlan",
        "Id": "randomnumber2",
        "Created": "2022-05-24T00:22:58.945708161+04:30",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.1.0/26",
                    "IPRange": "192.168.1.2/24",
                    "Gateway": "192.168.1.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": "MacConfig"
        },
        "ConfigOnly": false,
        "Containers": {
            "containerid": {
                "Name": "Radarr",
                "EndpointID": "....",
                "MacAddress": "virtualmacaddress",
                "IPv4Address": "192.168.1.4/26",
                "IPv6Address": ""
            },
        },
        "Options": {
            "parent": "enp2s0"
        },
        "Labels": {}
    }
]

i use Portainer to manage containers

Monirzadeh avatar May 24 '22 11:05 Monirzadeh

hi @oijkn i try to deploy that but i get in trouble for now i have my macvlan with name 'mymacvlanexist' how should i connect that to that 'mymacvlanexist' instead of create new one? i think i should change this two part to connect network to 'mymacvlanexist' , but i don't know how.

    networks:
      macvlan0:
        ipv4_address: 192.168.1.110                                    # IP of the container for AdGuardHome, configure it to your needs

and

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0                                                     # Parent interface, configure it depending on your interface name
    ipam:
      config:
        - subnet: 192.168.1.0/24                                       # Subnet of the container
          gateway: 192.168.1.1                                         # Gateway of the network
          ip_range: 192.168.1.100/28                                   # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.100                                     # Reserved for RPi Server (IP of the host)

did you ran docker pull oijkn/adguardhome-doh-dot first ? cause when i did i got that error

i use Portainer and yes image downloaded

Monirzadeh avatar May 24 '22 11:05 Monirzadeh

replace that to place you want to store data for example

    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs

above config link /opt/AdGuardHome/conf path in container to /containersFiles/adguardhome/conf path in host machine

Monirzadeh avatar May 24 '22 11:05 Monirzadeh

replace that to place you want to store data for example

    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs

above config link /opt/AdGuardHome/conf path in container to /containersFiles/adguardhome/conf path in host machine

image

trinib avatar May 24 '22 12:05 trinib

HI,

@trinib Your main problem seems to be that you are on a 64 bit architecture while my image is for 32 bit. I will try to build a multi-arch image to solve this problem.

Then if you are in a 192.168.100.0/24 subnet you have to adapt the network configuration accordingly. So you have to replace 192.168.1.110 by 192.168.100.110. I guess your gateway should be 192.168.100.1, right?

I realized, that I forgot in the README to indicate the modification of the network parameters in the files located in the network directory of the Github (I will make an update of the README).

And for <path_to_data>, I mean the real path where you will install the doker stuff for AdGuardHome. Example : /data/docker/adguardhome/. I usually use the /data of my HDD to store all my docker :)

@Monirzadeh I think you have to use something like that :

version: "2"

services:
  adguardhome:
    <all previous config...>
    networks:
      - MyMacVlan

networks:
  MyMacVlan:
    external: true

oijkn avatar May 24 '22 12:05 oijkn

@oijkn thanks now i get same error that @trinib get as you mention it is becuse of image is 32bit i will wait to build a 64bit version. where do you announce 64bit version?

Monirzadeh avatar May 24 '22 12:05 Monirzadeh

HI,

@trinib Your main problem seems to be that you are on a 64 bit architecture while my image is for 32 bit. I will try to build a multi-arch image to solve this problem.

Then if you are in a 192.168.100.0/24 subnet you have to adapt the network configuration accordingly. So you have to replace 192.168.1.110 by 192.168.100.110. I guess your gateway should be 192.168.100.1, right?

I realized, that I forgot in the README to indicate the modification of the network parameters in the files located in the network directory of the Github (I will make an update of the README).

And for <path_to_data>, I mean the real path where you will install the doker stuff for AdGuardHome. Example : /data/docker/adguardhome/. I usually use the /data of my HDD to store all my docker :)

@Monirzadeh I think you have to use something like that :

version: "2"

services:
  adguardhome:
    <all previous config...>
    networks:
      - MyMacVlan

networks:
  MyMacVlan:
    external: true

Ahh i though it was these type of issues (architecture/network address) . I'll do adjustments and see how it goes. What about docker-compose up -d fixed to docker compose up -d (no-dash)

trinib avatar May 24 '22 12:05 trinib

@oijkn Thanks so much again for the contribution.🔥🎉. when i add your docker links to readme and i'll finally close this💩

trinib avatar May 24 '22 12:05 trinib

@oijkn when ever you feel like it or if you want to, it would be cool to make one with DNScrypt and Knot(soon to add, being setup/tested by @jo20201) with AGH. Those two are very customizable alternatives to cloudflared tunnel and unbound, to tell which has better security is hard for anyone to say unless you are network programmer and actually spends time comparing it lol.

I want DNScrypt and Knot for users who want extra features and like configuring stuff. it will be a personal preference option more advanced, unless in the future any becomes obsolete

trinib avatar May 24 '22 13:05 trinib

@trinib ok I'll have a look at it as soon as possible

@trinib @Monirzadeh Can you type this command : dpkg --print-architecture and give me the result please ? Thank

oijkn avatar May 24 '22 13:05 oijkn

dpkg --print-architecture

amd64

Monirzadeh avatar May 24 '22 13:05 Monirzadeh

dpkg --print-architecture

amd64

It's not an Raspberry Pi 64 bit, right?

oijkn avatar May 24 '22 13:05 oijkn

dpkg --print-architecture

amd64

It's not an Raspberry Pi 64 bit, right?

no it is a pc

Monirzadeh avatar May 24 '22 13:05 Monirzadeh

OK thanks you, @trinib can you type the same command please?

oijkn avatar May 24 '22 14:05 oijkn

OK thanks you, @trinib can you type the same command please?

image

trinib avatar May 24 '22 14:05 trinib

Hi @trinib & @Monirzadeh I just pushed an multi-arch docker image, can you try it, please ?

image

oijkn avatar May 25 '22 09:05 oijkn

Hi @trinib & @Monirzadeh I just pushed an multi-arch docker image, can you try it, please ?

image

hi @oijkn o get bellow error

Deployment error
failed to deploy a stack: Creating Adguardhome ... [1A[2K Creating Adguardhome ... [31merror[0m [1B ERROR: for Adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type Encountered errors while bringing up the project. : exit status 1

with this config

version: "2"                                                           # Docker Compose version for Portainer

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: Adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000                                                      # User ID (UID)
      - PGID=100                                                       # Group ID (GID)
      - TZ=Europe/London                                                # Timezone
      - LANG=en_US.UTF8                                                # Language
      - LANGUAGE=en_US.UTF8                                            # Language (same as LANG)
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"                  # Watchtower (auto update)
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs
    cap_add:
      - NET_ADMIN
    networks:
      - MyMacVlan
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /containersFiles/crontab/root:/etc/crontabs/root:z               # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/tmp/unbound/root.hints      # Configure '<path_to_data>' to your needs
    restart: unless-stopped

networks:
  MyMacVlan:
    external: true

i don't know why ,but every time deployment stop with above error create network adguardhome-doh-dot_default too.

Monirzadeh avatar May 25 '22 10:05 Monirzadeh

@oijkn i keep only getting image

trinib avatar May 25 '22 10:05 trinib

Hi @trinib & @Monirzadeh I just pushed an multi-arch docker image, can you try it, please ?

image

hi @oijkn o get bellow error

Deployment error
failed to deploy a stack: Creating Adguardhome ... [1A[2K Creating Adguardhome ... [31merror[0m [1B ERROR: for Adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type Encountered errors while bringing up the project. : exit status 1

with this config

version: "2"                                                           # Docker Compose version for Portainer

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: Adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000                                                      # User ID (UID)
      - PGID=100                                                       # Group ID (GID)
      - TZ=Europe/London                                                # Timezone
      - LANG=en_US.UTF8                                                # Language
      - LANGUAGE=en_US.UTF8                                            # Language (same as LANG)
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"                  # Watchtower (auto update)
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs
    cap_add:
      - NET_ADMIN
    networks:
      - MyMacVlan
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /containersFiles/crontab/root:/etc/crontabs/root:z               # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/tmp/unbound/root.hints      # Configure '<path_to_data>' to your needs
    restart: unless-stopped

networks:
  MyMacVlan:
    external: true

i don't know why ,but every time deployment stop with above error create network adguardhome-doh-dot_default too.

Perhaps the problem is from service cron, network settings is missing because you are using existing macvlan network.

oijkn avatar May 25 '22 12:05 oijkn

@oijkn i keep only getting image

Can you provide me the result of the command : docker logs adguardhome ?

And yes you are using the good method to install Docker stuff.

oijkn avatar May 25 '22 12:05 oijkn

issing bec

@oijkn so it is something that should fix in your side that is right? container that created (can't start) has correct network (MyMacVlan) it just create adguardhome-doh-dot_default too

Monirzadeh avatar May 25 '22 12:05 Monirzadeh

@oijkn i tried 32bit and it still do not work

@oijkn i keep only getting image

Can you provide me the result of the command : docker logs adguardhome ?

And yes you are using the good method to install Docker stuff.

nothing shows

trinib avatar May 25 '22 12:05 trinib

@ i will try again with fresh install 32bit

trinib avatar May 25 '22 12:05 trinib

@ i will try again with fresh install 32bit

Actually I'm trying to install an environment ARM64 over my Win10 to test my docker :)

oijkn avatar May 25 '22 13:05 oijkn

@oijkn but is it strange 32bit works for you and not for me.. same pi and os

trinib avatar May 25 '22 14:05 trinib

@oijkn but is it strange 32bit works for you and not for me.. same pi and os

Did you edit the eth0 files in the network directory?

Can you share your docker-compose.yml and eth0 files?

oijkn avatar May 25 '22 15:05 oijkn

yes i edit it and i got some error

Can you share your docker-compose.yml and eth0 files?

i just change ip and docker location

trinib avatar May 25 '22 15:05 trinib

Did you test this on raspbery pi hardware or from windows VM?

trinib avatar May 25 '22 15:05 trinib

Did you test this on raspbery pi hardware or from windows VM?

Actually this docker stack run in my Rasp PI 4 8Go and I'm trying to mount an Qemu VM with arm64 to test it.

oijkn avatar May 25 '22 16:05 oijkn

Did you test this on raspbery pi hardware or from windows VM?

Actually this docker stack run in my Rasp PI 4 8Go and I'm trying to mount an Qemu VM with arm64 to test it.

why you not using arm64 for the pi4?

trinib avatar May 25 '22 16:05 trinib

@oijkn are you sure you did the same thing from your guide and see it work on a raspberry pi ? why are you even on a VM ?

Because my Raspberry Pi OS is an 32 bit and I can't test 64 bit, so I need to use a VM with arm64 architecture to validate my Docker image. When all is in place I will tell you if that works 😊

oijkn avatar May 25 '22 18:05 oijkn

@oijkn

AGH works with this

version: "2"
services:
  adguardhome:
    image: adguard/adguardhome
    container_name: adguardhome
    ports:
      - 53:53/tcp
      - 53:53/udp
      - 784:784/udp
      - 853:853/tcp
      - 3000:3000/tcp
      - 80:80/tcp
      - 443:443/tcp
    volumes:
      - ./workdir:/opt/adguardhome/work
      - ./confdir:/opt/adguardhome/conf
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /home/pi/adguardhome-doh-dot/crontab/root:/etc/crontabs/root:z               # Configure '<path_to_data>' to your needs
      - /home/pi/adguardhome-doh-dot/unbound/root.hints:/tmp/unbound/root.hints      # Configure '<path_to_data>' to your needs
    restart: unless-stopped

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0                                                     # Parent interface, configure it depending on your interface name
    ipam:
      config:
        - subnet: 192.168.1.0/24                                       # Subnet of the container
          gateway: 192.168.1.1                                         # Gateway of the network
          ip_range: 192.168.1.100/28                                   # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.100    

trinib avatar May 26 '22 00:05 trinib

@oijkn

AGH works with this

version: "2"
services:
  adguardhome:
    image: adguard/adguardhome
    container_name: adguardhome
    ports:
      - 53:53/tcp
      - 53:53/udp
      - 784:784/udp
      - 853:853/tcp
      - 3000:3000/tcp
      - 80:80/tcp
      - 443:443/tcp
    volumes:
      - ./workdir:/opt/adguardhome/work
      - ./confdir:/opt/adguardhome/conf
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /home/pi/adguardhome-doh-dot/crontab/root:/etc/crontabs/root:z               # Configure '<path_to_data>' to your needs
      - /home/pi/adguardhome-doh-dot/unbound/root.hints:/tmp/unbound/root.hints      # Configure '<path_to_data>' to your needs
    restart: unless-stopped

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0                                                     # Parent interface, configure it depending on your interface name
    ipam:
      config:
        - subnet: 192.168.1.0/24                                       # Subnet of the container
          gateway: 192.168.1.1                                         # Gateway of the network
          ip_range: 192.168.1.100/28                                   # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.100    

Yes but with the official Docker of AGH you don't have all the stuff with Unbound, Cloudflared & Stubby.

Today I'm not at home, so I will continue my tests tomorrow.

oijkn avatar May 26 '22 07:05 oijkn

@trinib on my side I don't notice any error and the docker works correctly on ARM64 architecture. If below my configuration :

root@ubuntu:/data/adguardhome-doh-dot# dpkg --print-architecture
arm64
root@ubuntu:/data/adguardhome-doh-dot# docker ps
CONTAINER ID   IMAGE                              COMMAND                  CREATED         STATUS         PORTS     NAMES
b4a4646d4e75   alpine:latest                      "crond -f -d 8"          3 minutes ago   Up 2 minutes             cron
b417925035d1   oijkn/adguardhome-doh-dot:latest   "/lib/systemd/systemd"   3 minutes ago   Up 2 minutes             adguardhome
root@ubuntu:/data/adguardhome-doh-dot# cat /data/adguardhome-doh-dot/network/interfaces.d/eth0
# Ethernet interface (eth0)
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.11

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.1.14/32 dev macvlan-shim

    # bring up the new network interface
    up ip link set macvlan-shim up

    # add a route to the container
    post-up ip route add 192.168.1.11/32 dev macvlan-shim
root@ubuntu:/data/adguardhome-doh-dot# cat docker-compose.yml
version: "2"

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Paris
      - LANG=fr_FR.UTF8
      - LANGUAGE=fr_FR.UTF8
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - ./adguardhome/conf:/opt/AdGuardHome/conf
      - ./adguardhome/work:/opt/AdGuardHome/work
      - ./unbound/root.hints:/var/lib/unbound/root.hints
    cap_add:
      - NET_ADMIN
    networks:
      macvlan0:
        ipv4_address: 192.168.1.11  # IP of the container
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - ./crontab/root:/etc/crontabs/root:z
      - ./unbound/root.hints:/tmp/unbound/root.hints
    restart: unless-stopped

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.1.0/24      # Subnet of the container
          gateway: 192.168.1.1        # Gateway of the container
          ip_range: 192.168.1.10/28  # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.10    # Reserved for RPi Server

oijkn avatar May 27 '22 09:05 oijkn

@oijkn hi, do you have any progress on amd64?

Monirzadeh avatar May 27 '22 09:05 Monirzadeh

@Monirzadeh yes the multi-arch also support amd64.

oijkn avatar May 27 '22 09:05 oijkn

@oijkn i still get image

trinib avatar May 27 '22 10:05 trinib

@oijkn install this on raspberry pi4 64bit. you have configurations for VM and locations for a pc. that is why it is not working on pi

Actually this Docker is running on my Raspberry Pi 4 with OS 32 bit, without any problem.

Can you provide me your configuration files, like me above, please? Perhaps your problem comes from the network configuration...

oijkn avatar May 27 '22 10:05 oijkn

# Ethernet interface (eth0)
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.11

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.1.14/32 dev macvlan-shim

    # bring up the new network interface
    up ip link set macvlan-shim up

    # add a route to the container
    post-up ip route add 192.168.1.11/32 dev macvlan-shim
version: "2"

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Paris
      - LANG=fr_FR.UTF8
      - LANGUAGE=fr_FR.UTF8
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /home/pi/adguardhome-doh-dot/adguardhome/conf:/opt/AdGuardHome/conf
      - /home/pi/adguardhome-doh-dot/adguardhome/work:/opt/AdGuardHome/work
      - /home/pi/adguardhome-doh-dot/unbound/root.hints:/var/lib/unbound/root.hints
    cap_add:
      - NET_ADMIN
    networks:
      macvlan0:
        ipv4_address: 192.168.1.11  # IP of the container
    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /home/pi/adguardhome-doh-dot/crontab/root:/etc/crontabs/root:z
      - /home/pi/adguardhome-doh-dot/unbound/root.hints:/tmp/unbound/root.hints
    restart: unless-stopped

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.1.0/24      # Subnet of the container
          gateway: 192.168.1.1        # Gateway of the container
          ip_range: 192.168.1.10/28  # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.1.10    # Reserved for RPi Server

trinib avatar May 27 '22 10:05 trinib

@Monirzadeh yes the multi-arch also support amd64.

@oijkn with this config

version: "2"                                                           # Docker Compose version for Portainer

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: Adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000                                                      # User ID (UID)
      - PGID=100                                                       # Group ID (GID)
      - TZ=Europe/London                                                 # Timezone
      - LANG=en_US.UTF8                                                # Language
      - LANGUAGE=en_US.UTF8                                            # Language (same as LANG)
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"                  # Watchtower (auto update)
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs
    cap_add:
      - NET_ADMIN
    networks:
      - MyMacVlan

    restart: unless-stopped

  cron:
    image: alpine:latest
    container_name: cron
    hostname: rpi-cron
    command: crond -f -d 8
    depends_on:
      - adguardhome
    volumes:
      - /containersFiles/crontab/root:/etc/crontabs/root:z               # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/tmp/unbound/root.hints      # Configure '<path_to_data>' to your needs
    restart: unless-stopped

networks:
  MyMacVlan:
    external: true

i get this error

Deployment error
failed to deploy a stack: Creating network "adguardhome-doh-dot_default" with the default driver Pulling adguardhome (oijkn/adguardhome-doh-dot:latest)... 
Pulling cron (alpine:latest)...
Creating Adguardhome ...
Creating Adguardhome ...
merror ERROR: for Adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting

do i something worg or need any specific change in my config?

Monirzadeh avatar May 27 '22 10:05 Monirzadeh

@oijkn my network image

trinib avatar May 27 '22 11:05 trinib

Then if you are in a 192.168.100.0/24 subnet you have to adapt the network configuration accordingly. So you have to replace 192.168.1.xxx by 192.168.100.xxx. I guess your gateway should be 192.168.100.1, right?

@trinib like as said before, you have to adapt network configuration with your subnet.

@Monirzadeh I will try to embed the service cron in adguardhome to avoid the problem with creating default network.

oijkn avatar May 27 '22 11:05 oijkn

@oijkn i tried that already and i got

image

trinib avatar May 27 '22 12:05 trinib

@oijkn i tried that already and i got

image

@trinib

can you post complete network part of your config that you get this error

Monirzadeh avatar May 27 '22 12:05 Monirzadeh

it is the same config file i just change network

trinib avatar May 27 '22 12:05 trinib

.........
.........
    networks:
      macvlan0:
        ipv4_address: 192.168.100.11  # IP of the container
.....
.....
networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.100.0/24      # Subnet of the container
          gateway: 192.168.100.1        # Gateway of the container
          ip_range: 192.168.100.10/28  # Usable Host IP Range: 192.168.1.97 - 192.168.100.110
          aux_addresses:
            rpi-srv: 192.168.100.10    # Reserved for RPi Server

it is "exactly" like above?

Monirzadeh avatar May 27 '22 12:05 Monirzadeh

yea

trinib avatar May 27 '22 12:05 trinib

@oijkn i tried that already and i got

image

@trinib Use docker-compose down and try to run docker-compose up -d or try to docker network rm the network that was previously created.

oijkn avatar May 27 '22 12:05 oijkn

@oijkn why do you have a - in the middle ? how did you install docker?

trinib avatar May 27 '22 12:05 trinib

@oijkn why do you have a - in the middle ? how did you install docker?

https://docs.docker.com/compose/reference/

Monirzadeh avatar May 27 '22 12:05 Monirzadeh

@oijkn i still get after changing to 192.168.100.xxx

image

trinib avatar May 27 '22 12:05 trinib

@oijkn why do you have a - in the middle ? how did you install docker?

docs.docker.com/compose/reference

i use docker compose up -d .. with no dash

trinib avatar May 27 '22 12:05 trinib

@oijkn i know this is some simple issue . your not giving much to work with ..

trinib avatar May 27 '22 12:05 trinib

@oijkn i know this is some simple issue . your not giving much to work with ..

before run that command be sure docker network ls has only bridge host and none

Monirzadeh avatar May 27 '22 12:05 Monirzadeh

@oijkn why do you have a - in the middle ? how did you install docker?

docs.docker.com/compose/reference

i use docker compose up -d .. with no dash

The -d option if for detached mode (run containers in the background).

oijkn avatar May 27 '22 13:05 oijkn

@oijkn why do you have a - in the middle ? how did you install docker?

docs.docker.com/compose/reference

i use docker compose up -d .. with no dash

The -d option if for detached mode (run containers in the background).

no not -d .. docker-compose

trinib avatar May 27 '22 13:05 trinib

@oijkn why do you have a - in the middle ? how did you install docker?

docs.docker.com/compose/reference

i use docker compose up -d .. with no dash

The -d option if for detached mode (run containers in the background).

no not -d .. docker-compose

I don't understand, sorry. To use docker-compose.yml file you need to install docker-compose in your Raspberry Pi (a lot of tuto over internet). Or use Portainer to manage this stack 😉

oijkn avatar May 27 '22 13:05 oijkn

can you please show how YOU installed docker.

trinib avatar May 27 '22 13:05 trinib

@oijkn im gonna try a different method and see.. I will let you know

trinib avatar May 27 '22 13:05 trinib

can you please show how YOU installed docker.

@trinib try this tuto : https://dev.to/elalemanyo/how-to-install-docker-and-docker-compose-on-raspberry-pi-1mo

oijkn avatar May 27 '22 14:05 oijkn

@oijkn same Restarting (255) issue. freshly installed pi os

trinib avatar May 27 '22 14:05 trinib

@oijkn same Restarting (255) issue. freshly installed pi os

@trinib to avoid any network configuration problem, can you post the result of the following commands :

  • ip a
  • ip route list
  • dig 1.1.1.1 | grep "SERVER:"
  • docker ps
  • docker network ls

And also post the content of the docker-compose.yml and network/interfaces.d/eth0 files.

oijkn avatar May 27 '22 14:05 oijkn

@Monirzadeh I just pushed the new version without the cron service in the docker-compose (which will solve your problem Creating network "adguardhome-doh-dot_default"), you have to clone the new project from Github and pul new image from dockerhub.

oijkn avatar May 27 '22 15:05 oijkn

@oijkn image

# Ethernet interface (eth0)
allow-hotplug eth0
iface eth0 inet static
    address 192.168.100.100
    netmask 255.255.255.0
    gateway 192.168.100.1
    dns-nameservers 192.168.100.110

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.100.99/32 dev macvlan-shim

    # bring up the new network interface
    up ip link set macvlan-shim up

    # add a route to the container
    post-up ip route add 192.168.100.110/32 dev macvlan-shim
version: "2"

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Paris
      - LANG=fr_FR.UTF8
      - LANGUAGE=fr_FR.UTF8
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /home/pi/adguardhome-doh-dot/adguardhome/conf:/opt/AdGuardHome/conf
      - /home/pi/adguardhome-doh-dot/adguardhome/work:/opt/AdGuardHome/work
      - /home/pi/adguardhome-doh-dot/unbound/root.hints:/var/lib/unbound/root.hints
    cap_add:
      - NET_ADMIN
    networks:
      macvlan0:
        ipv4_address: 192.168.100.110  # IP of the container
    restart: unless-stopped

networks:
  macvlan0:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.100.0/24      # Subnet of the container
          gateway: 192.168.100.1        # Gateway of the container
          ip_range: 192.168.100.100/28  # Usable Host IP Range: 192.168.1.97 - 192.168.1.110
          aux_addresses:
            rpi-srv: 192.168.100.100    # Reserved for RPi Server

trinib avatar May 27 '22 17:05 trinib

@trinib your network configuration is not good, I will give you the good one.

Edit: @trinib your ip address is not good to make range, the easiest way is to change the ip address of your rasp from 192.168.100.192 to 192.168.100.100

oijkn avatar May 27 '22 17:05 oijkn

@Monirzadeh I just pushed the new version without the cron service in the docker-compose (which will solve your problem Creating network "adguardhome-doh-dot_default"), you have to clone the new project from Github and pul new image from dockerhub.

@trinib i remove cron part but again get this error

failed to deploy a stack: Creating Adguardhome ... [1A[2K Creating Adguardhome ... [31merror[0m [1B ERROR: for Adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hint

this is my compose file something is wrong with this part

 - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints

but i don't know what it is

version: "2"                                                           # Docker Compose version for Portainer

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: Adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000                                                      # User ID (UID)
      - PGID=100                                                       # Group ID (GID)
      - TZ=Europe/London                                                 # Timezone
      - LANG=en_US.UTF8                                                # Language
      - LANGUAGE=en_US.UTF8                                            # Language (same as LANG)
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"                  # Watchtower (auto update)
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs
    cap_add:
      - NET_ADMIN
    networks:
      - MyMacVlan

    restart: unless-stopped
networks:
  MyMacVlan:
    external: true

old image removed and portainer get new one. network not created anymore :+1:

Monirzadeh avatar May 27 '22 18:05 Monirzadeh

@Monirzadeh so the new docker image works for you? 😊

oijkn avatar May 27 '22 18:05 oijkn

@Monirzadeh so the new docker image works for you? blush

@oijkn not completely. it just crated but not starting

get this error while deploy

failed to deploy a stack: Creating Adguardhome ... [1A[2K Creating Adguardhome ... [31merror[0m [1B ERROR: for Adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hints (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for adguardhome Cannot start service adguardhome: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/containersFiles/unbound/root.hints" to rootfs at "/var/lib/unbound/root.hints": mount /containersFiles/unbound/root.hints:/var/lib/unbound/root.hint

Monirzadeh avatar May 27 '22 18:05 Monirzadeh

@Monirzadeh can you type tree /containersFiles/ and post result?

oijkn avatar May 27 '22 18:05 oijkn

tree /containersFiles/

@oijkn

tree adguardhome/ unbound/
adguardhome/
├── conf
└── work
unbound/
└── root.hints

other folder in containersFiles is related to other container

Monirzadeh avatar May 27 '22 18:05 Monirzadeh

@Monirzadeh like is written in the guide in my github repo, you need to clone it and then put the path to docker-compose.yml file. In the result of the tree command I don't see all needed directories/files.

oijkn avatar May 27 '22 18:05 oijkn

@oijkn is there any way to do that all inside portainer?

Monirzadeh avatar May 27 '22 18:05 Monirzadeh

Portainer is a tool to manage only stack or container. You can't use git commands.

From your host, you must git clone my repo, to have all needed files/conf for running the stack.

You can git clone repo from your /containersFiles directory, that will create a subfolder adguardhome-doh-dot.

oijkn avatar May 27 '22 19:05 oijkn

Portainer is a tool to manage only stack or container. You can't use git commands.

From your host, you must git clone my repo, to have all needed files/conf for running the stack.

You can git clone repo from your /containersFiles directory, that will create a subfolder adguardhome-doh-dot.

@oijkn i do this steps: 1 - i clone your repository in containersFiles/adguardhome-doh-dot 2. deploy this stack in portainer

version: "2"                                                           # Docker Compose version for Portainer

services:
  adguardhome:
    image: oijkn/adguardhome-doh-dot:latest
    container_name: Adguardhome
    hostname: rpi-adguard
    environment:
      - PUID=1000                                                      # User ID (UID)
      - PGID=100                                                       # Group ID (GID)
      - TZ=Eroup/London                                                 # Timezone
      - LANG=en_US.UTF8                                                # Language
      - LANGUAGE=en_US.UTF8                                            # Language (same as LANG)
    tmpfs:
      - /run
      - /run/lock
      - /tmp
#    labels:
#      - "com.centurylinklabs.watchtower.enable=true"                  # Watchtower (auto update)
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      - /containersFiles/adguardhome-doh-dot/adguardhome/conf:/opt/AdGuardHome/conf          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome-doh-dot/adguardhome/work:/opt/AdGuardHome/work          # Configure '<path_to_data>' to your needs
      - /containersFiles/adguardhome-doh-dot/unbound/root.hints:/var/lib/unbound/root.hints  # Configure '<path_to_data>' to your needs
    cap_add:
      - NET_ADMIN
    networks:
      - MyMacVlan

    restart: unless-stopped
networks:
  MyMacVlan:
    external: true

it is tree of adguardhome-doh-dot

adguardhome-doh-dot/
├── adguardhome
│   ├── conf
│   └── work
├── cloudflare
│   └── cloudflared.service
├── crontab
│   └── root
├── distribution
│   └── Dockerfile
├── docker-compose.yml
├── LICENSE
├── network
│   ├── interfaces
│   └── interfaces.d
│       └── eth0
├── README.md
├── stubby
│   └── stubby.yml
└── unbound
    ├── root.hints
    └── unbound.conf

container deploy without error but is is not work. i cant attach to that in log i have bellow masseage

No log line matching the '' filter

Update: i clone repository and run that from terminal but again same result.

Before running our DNS resolvers, it is a good idea to turn off [systemd-resolved](https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html).

Edit the file /etc/systemd/resolved.conf as below :+1: 

above part from read me is necessary or optional?

Monirzadeh avatar May 27 '22 19:05 Monirzadeh

@Monirzadeh what's the result of the command : docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' adguardhome.

For example if it's 192.1.68.1.110, then you have to open your web browser to http://192.168.1.110:3000 and follow the installation wizard.

To answer to your question, editing /ets/systemd/resolved.conf it's recommended from @trinib guide.

oijkn avatar May 27 '22 20:05 oijkn

@Monirzadeh what's the result of the command : docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' adguardhome.

For example if it's 192.1.68.1.110, then you have to open your web browser to http://192.168.1.110:3000 and follow the installation wizard.

To answer to your question, editing /ets/systemd/resolved.conf it's recommended from @trinib guide.

it is return nothing

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' Adguardhome 

in portainer that not get ip.

i am not sure but how should i change containersFiles/adguardhome-doh-dot/network/interfaces.d/eth0 if it is my details of MyMacVlan?

IPV4 Subnet - 192.168.1.0/26
IPV4 Gateway - 192.168.1.1
IPV4 IP range - 192.168.1.2/24
my device name is enp1s3

should i change eth0 to enp1s3 or something like that?

update: is it wrong?

# Ethernet interface (eth0)
allow-hotplug enp2s0
iface enp2s0 inet static
    address 192.168.1.15
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.16

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.1.2/24 dev MyMacVlan

    # bring up the new network interface
    up ip link set MyMacVlan up

    # add a route to the container
    post-up ip route add 192.168.1.2/24 dev MyMacVlan

To answer to your question, editing /ets/systemd/resolved.conf it's recommended from @trinib guide.

so for now it is not the problem

Monirzadeh avatar May 27 '22 20:05 Monirzadeh

image

@oijkn do you think i have some permission issue ?

trinib avatar May 27 '22 20:05 trinib

@Monirzadeh you have to leave the default docker interface at eth0.

Try to use this conf :

# Ethernet interface (eth0)
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.15
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.16

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.1.14/32 dev macvlan-shim

    # bring up the new network interface
    up ip link set macvlan-shim up

    # add a route to the container
    post-up ip route add 192.168.1.xxx/32 dev macvlan-shim     <<==== replace xxx by the IP address of your host

oijkn avatar May 27 '22 20:05 oijkn

@Monirzadeh you have to leave the default docker interface at eth0.

Try to use this conf :

# Ethernet interface (eth0)
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.15
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.16

    # create a new network macvlan interface on top of eth0
    pre-up ip link add macvlan-shim link eth0 type macvlan mode bridge

    # assign an IP and the network space to the new network interface
    pre-up ip addr add 192.168.1.14/32 dev macvlan-shim

    # bring up the new network interface
    up ip link set macvlan-shim up

    # add a route to the container
    post-up ip route add 192.168.1.xxx/32 dev macvlan-shim     <<==== replace xxx by the IP address of your host

@oijkn i test that and this not work

Monirzadeh avatar May 27 '22 21:05 Monirzadeh

is it possible docker get variable environment from user and generate automatically all config files that it need? or some health check mechanism that clarify the problem?

Monirzadeh avatar May 27 '22 21:05 Monirzadeh

@trinib your network configuration is not good, I will give you the good one.

Edit: @trinib your ip address is not good to make range, the easiest way is to change the ip address of your rasp from 192.168.100.192 to 192.168.100.100

@oijkn

image

trinib avatar May 27 '22 21:05 trinib

Ok, I must investigate how to add some logs.... I'm sorry but in my Rasp PI all works good...

image

@trinib & @Monirzadeh In the meantime, can you give me the result of the command : docker exec adguardhome journalctl

oijkn avatar May 27 '22 21:05 oijkn

@oijkn container is runnig but i get this error

Error response from daemon: Container 16c247e132c13216349815da286faee08faf3268a810c797b1199b770466ba45 is restarting, wait until the container is running

is it possible to move all the config(in your git repository) to the container image?

Monirzadeh avatar May 28 '22 09:05 Monirzadeh

@oijkn container is runnig but i get this error

Error response from daemon: Container 16c247e132c13216349815da286faee08faf3268a810c797b1199b770466ba45 is restarting, wait until the container is running

is it possible to move all the config(in your git repository) to the container image?

It's not a good idea because people will want/need to edit config depending their needs.

oijkn avatar May 28 '22 10:05 oijkn

@oijkn container is runnig but i get this error

Error response from daemon: Container 16c247e132c13216349815da286faee08faf3268a810c797b1199b770466ba45 is restarting, wait until the container is running

is it possible to move all the config(in your git repository) to the container image?

It's not a good idea because people will want/need to edit config depending their needs.

i mean remove step that need to clone repository config files came with image and people can edit them after running or with environment variable. in this way always we have a docker that always run correctly and people can config that too

Monirzadeh avatar May 28 '22 10:05 Monirzadeh

@oijkn image

trinib avatar May 28 '22 12:05 trinib

@oijkn were you using pi OS desktop or lite when testing docker?

trinib avatar May 28 '22 16:05 trinib

docker exec adguardhome journalctl

I'm using the lite version. For your info I'm starting from scratch based on the official AdGuardHome docker image, I try to integrate third party applications like Unbound, Cloudflared etc...

I'll keep you posted as soon as it's ready because it's a lot of work and testing.

oijkn avatar May 28 '22 16:05 oijkn

docker exec adguardhome journalctl

I'm using the lite version. For your info I'm starting from scratch based on the official AdGuardHome docker image, I try to integrate third party applications like Unbound, Cloudflared etc...

I'll keep you posted as soon as it's ready because it's a lot of work and testing.

thanks. It has to be a network thing.

ps

64bit OS does work on Pi4 20220528_122955

trinib avatar May 28 '22 16:05 trinib

@oijkn before I forget. You left out DNSStubListener. It's like saying to turn of systemd-resolved service when is just its DNSStubListener feature. It should be like systemd-resolved - DNSStubListener. .

image

trinib avatar May 28 '22 23:05 trinib

@oijkn before I forget. You left out DNSStubListener. It's like saying to turn of systemd-resolved service when is just its DNSStubListener feature. It should be like systemd-resolved - DNSStubListener. .

image

In the guide, it's indicated to modify the value of DNSStubListener to no

Screenshot_20220529_101918_com.github.android_edit_235018174617263.jpg

oijkn avatar May 29 '22 08:05 oijkn