Docker Community Forums

Share and learn in the Docker community.

Docker pihole issue

Dear all,

I am using rasberry pi and docker to host pihole.
I always use commands to download pihole image, for more than 6 months.

docker run -d \
    --name pihole \
    --hostname pihole \
    --net=host \
    -e ServerIP="$IP" \
    -e TZ="Asia/Hong_Kong" \
    -e WEBPASSWORD="xxxxx" \
    -v "$(pwd)/etc-pihole/:/etc/pihole/" \
    -v "$(pwd)/etc-dnsmasq.d/:/etc/dnsmasq.d/" \
    --dns= \
    --restart=unless-stopped \

But now, suddenly I got a message when starting up pihole.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

It seems like it downloaded incorrect platform to run.
I googled a few days but still cannot find answer.
I tried downgrade docker-ce and docker-ce-cli to 5:19.03.14~3-0 but cannot solve the issue.
May I know how can I fix it?
Thank you!

Current docker version and raspberry info:

pi@rpi:/apps $ dpkg-query -l | grep docker
ii  docker-ce                             5:20.10.2~3-0~raspbian-buster          armhf        Docker: the open-source application container engine
ii  docker-ce-cli                         5:20.10.2~3-0~raspbian-buster          armhf        Docker CLI: the open-source application container engine
ii  docker-ce-rootless-extras             5:20.10.2~3-0~raspbian-buster          armhf        Rootless support for Docker.
pi@rpiy:/apps $ uname -a
Linux rpi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux

Steps to reproduce
Run Docker container as follows:

docker run --privileged --hostname=pihole --name=pihole --net=host -e TZ=Europe/Dublin -e WEBPASSWORD=yourpw -e ServerIP= -v pihole:/etc/pihole -v dnsmasq:/etc/dnsmasq.d -p 80:80 -p 53:53/tcp -p 53:53/udp -p 67:67/udp -p 443:443/tcp --restart=always pihole/pihole

View pihole image status in portainer or using ‘docker ps -a’ at command line.

Thank you for your response.
Your command is good.
I tried my commands again and suddenly it ran fine although the error of incorrect architecture was still there.
Not sure what’s wrong with it.
Thanks anyway.