Giter Site home page Giter Site logo

Comments (258)

trinib avatar trinib commented on July 29, 2024 3

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. πŸ™πŸ™πŸ™

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024 2

dpkg --print-architecture

amd64

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 2

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

image

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 2

@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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 2

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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 :)

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024 1

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024 1

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

image

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

@ i will try again with fresh install 32bit

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

@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 😊

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024 1

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024 1

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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)

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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 πŸ˜…

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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)

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn Thanks so much again for the contribution.πŸ”₯πŸŽ‰. when i add your docker links to readme and i'll finally close thisπŸ’©

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

dpkg --print-architecture

amd64

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

dpkg --print-architecture

amd64

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

no it is a pc

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn i keep only getting
image

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@ i will try again with fresh install 32bit

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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    

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@Monirzadeh yes the multi-arch also support amd64.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn i still get
image

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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...

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024
# 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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn my network
image

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn i tried that already and i got

image

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@oijkn i tried that already and i got

image

@trinib

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

it is the same config file i just change network

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024
.........
.........
    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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

yea

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn i still get after changing to 192.168.100.xxx

image

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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).

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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 πŸ˜‰

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

can you please show how YOU installed docker.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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 πŸ‘

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

tree /containersFiles/

@oijkn

tree adguardhome/ unbound/
adguardhome/
β”œβ”€β”€ conf
└── work
unbound/
└── root.hints

other folder in containersFiles is related to other container

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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?

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

image

@oijkn do you think i have some permission issue ?

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

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?

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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?

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

@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.

from adguard-wireguard-unbound-dnscrypt.

Monirzadeh avatar Monirzadeh commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@oijkn
image

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

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

from adguard-wireguard-unbound-dnscrypt.

oijkn avatar oijkn commented on July 29, 2024

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.

from adguard-wireguard-unbound-dnscrypt.

trinib avatar trinib commented on July 29, 2024

@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

from adguard-wireguard-unbound-dnscrypt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.