Docker container has no dns

I'm trying to get a Nextcloud AIO container to work but it print then i created it when i look in the logs:

Could not resolve the host nextcloud.com.
Most likely the DNS resolving does not work.

I set the DNS Server in /etc/config/dockerd

Here:

config globals 'globals'
#	option alt_config_file '/etc/docker/daemon.json'
	option data_root '/mnt/mmcblk0p3/data/docker'
#	option log_driver 'local'
	option log_level 'warn'
	option iptables '1'
#	list hosts 'unix:///var/run/docker.sock'
#	option bip '172.18.0.1/24'
#	option fixed_cidr '172.17.0.0/16'
#	option fixed_cidr_v6 'fc00:1::/80'
#	option ipv6 '1'
#	option ip '::ffff:0.0.0.0'
	list dns '1.1.1.1'
#	list registry_mirrors 'https://<my-docker-mirror-host>'
#	list registry_mirrors 'https://hub.docker.com'

# Docker doesn't work well out of the box with fw4. This is because Docker relies on a compatibility layer that
# naively translates iptables rules. For the best compatibility replace the following dependencies:
# `firewall4` -> `firewall`
# `iptables-nft` -> `iptables-legacy`
# `ip6tables-nft` -> `ip6tables-legacy`

# Docker undermines the fw3 rules. By default all external source IPs are allowed to connect to the Docker host.
# See https://docs.docker.com/network/iptables/ for more details.

# firewall config changes are only additive i.e firewall will need to be restarted first to clear old changes,
# then docker restarted to load in new changes.
config firewall 'firewall'
	option device 'docker0'
	list blocked_interfaces 'wan'
#	option extra_iptables_args '--match conntrack ! --ctstate RELATED,ESTABLISHED' # allow outbound connections

It also doesn't work in debian or ubuntu containers:

Err:1 http://deb.debian.org/debian bullseye InRelease
  Temporary failure resolving 'deb.debian.org'

Container Config:

How can i fix this?

How that is OpenWRT related?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

I meant the docker containers of ubuntu and debian but i don't use it anymore so i can't run these commands

hi.

default behavior is described in the config file. which is: from any external IP into docker is allowed. but docker to external is blocked (e.g. list blocked_interfaces 'wan'). if you want your docker container to start connection to external IP over wan port (i.e. target on internet), uncomment the last line as it explains:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.