Hi,
this is something inside docker themselves and has nothing to do with DietPi because Docker is managing all the start option on your container.
Changing configuration on a running container is most likely not possible. Dropping the container and create a new one is an option and can be archived from inside portainer as well. Once a container was selected, you could Duplicate/Edit the container. This will basically create a new one and you would need to adjust settings like name, port and dns. As well you would need to do it each time you update portainer using dietpi-software
Another option is to change docker configuration globally and adjust settings inside /etc/docker/daemon.json. You would need to add DNS config like this
{
"data-root": "/mnt/dietpi_userdata/docker-data",
"log-driver": "journald",
"log-level": "warn",
"dns": ["1.1.1.1"],
"debug": false
}
Once docker was restarted, this would have an impact on all running container.
To verify, you would need to find our your container ID for portainer docker ps -a
root@DietPiProd:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71365064d368 portainer/portainer-ce "/portainer" 2 weeks ago Up 14 minutes 8000/tcp, 0.0.0.0:9002->9000/tcp portainer
88aa508455be dietpi/proxy "docker-entrypoint.s…" 7 weeks ago Up 14 minutes 0.0.0.0:3000->3000/tcp OneDrive-proxy
root@DietPiProd:~#
On this example, portaioner ID is starting 71365064d368
cd /mnt/dietpi_userdata/docker-data/containers/
ls -la
now you see all container
root@DietPiProd:/mnt/dietpi_userdata/docker-data/containers# ls -la
total 16
drwx-----x 4 root root 4096 Mar 4 00:40 .
drwx--x--x 13 root root 4096 Mar 4 01:36 ..
drwx-----x 4 root root 4096 Mar 4 01:36 71365064d368363a604ec4f828ef582f56cbfdce53d7228bf317ef0a50a72cd6
drwx------ 4 root root 4096 Mar 4 01:36 88aa508455be9dc4ccd5e4425e607101a4daab9452e7435573539ca3099ec0ba
root@DietPiProd:/mnt/dietpi_userdata/docker-data/containers#
Go inside the container fitting portainer ID
cd 71365064d368363a604ec4f828ef582f56cbfdce53d7228bf317ef0a50a72cd6/
ls -la
There you have DNS config file resolv.conf. It should contain the new global DNS config
cat resolv.conf
nameserver 1.1.1.1
BTW: if there is no DNS configure, Docker will always use the DNS server configured on the host running Docker enginge 