Update problem with Docker

I use a Synology 720 with Docker and Pihole.
An update was displayed in Pihole. I exported the Pi-Hole settings, deleted the container and downloaded the latest version. I imported the settings, the new PI-hole is now visible.
But Docker Tag shows me another update.

The following is displayed:

Docker Tag 2022.02.1 - Update available! Pi-hole v5.12 FTL v5.17 Web Interface v5.14.2

Is this an error? I have downloaded the latest version.

Translated with www.DeepL.com/Translator (free version)

The latest tag is 2022.09.2.

Yes, that's right. But I selected latest when I downloaded it.

The image is on Docker Hub and has been pulled many times. You might get better help asking this question on a Synology help forum.

You think the fault lies with Synology?
What if I don't select latest but directly 2022.09.2?
I already tried that, but I couldn't export the settings afterwards, the container doesn't have the name latest.
Would it work if I directly export the settings in PI Hole and import them again later?

How are you starting the container?
Using docker run? docker-compose? Portainer?

I only use 2 containers, Pi-hole and Unbound, the whole thing with the Docker programme.

The container is started with a switch on the right side. Quite uncomplicated and without a console.

I don't use docker run, docker-compose and Portainer.

The problem is not exactly about Synology.

His old container used 2022.02.1. The container creates an environment var with this value.
When he "updates" the container, his system (whatever he is using) just replaces the image, but it is keeping the volumes, variables and all config intact.

I made a test, starting a new container using image 2022.09.2. I also added an ENV VAR PIHOLE_DOCKER_TAG=2022.00.2 (note: this tag never existed).

The result was this:

What does that mean now?
Is this a programme error?
How do I get an update?

It means you are starting your new container using environment variables created by the old image.

To fix this, remove the PIHOLE_DOCKER_TAG variable before start the image (I don't know exactly how to do it in Synology because I don't use it).

I can edit the PIHOLE_DOCKER_TAG variable and also delete it.

Should I change the wrong entry to 2022.09.2?

I have tried both.
When I delete it, the update notice disappears, including the version display.

If I change the value to the correct one, it also appears in Pihole, but here the update note has also disappeared.

Did I have the right version all along, only the wrong one was displayed?

Exactly.

The new v5.12.1 update was no longer referred to. I have installed it, Pi-hole is running but the Docker Tag is apparently out of date again. I have edited the Docker Tag manually, now everything is OK.

Will this be the case with every update? It was never like this before.

You shouldn't have to edit that environment variable, because it should not persist between versions.

Take a read over the following:

TL;DR - you need to fully remove/destroy the old container, and recreate it with the new image.

I have never had to edit this variable :slight_smile:

Assuming you mean the one in the screenshot below, this is not enough to properly upgrade your container. Although I have my Pi-hole container running on my Synology, I do not use the Syno GUI to manage it as I find it rather lacking! Instead, I have set up a portainer container, and use that, but using docker-compose on the command line is also a fine option

I only use the switch in the screenshot to start or stop Pi-hole.
When updating, I stop Pi-hole, export the settings, delete the container, delete the image, download the latest image, import the settings and start Pi-hole with the switch.

Ah, this might explain it. When you export the settings, it includes all environment variables - even those you did not set yourself. Really, you should only be importing the user environment variables on a new run (or any that you have overridden such as maybe DNSMASQ_USER)

Having looked at an exported json file for my own container... before re-importing, I would remove the following - as they are already set in the image:

      {
         "key" : "PATH",
         "value" : "/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "phpver",
         "value" : "php"
      },
      {
         "key" : "PIHOLE_DOCKER_TAG",
         "value" : "2022.09.3"
      },
      {
         "key" : "S6_OVERLAY_VERSION",
         "value" : "v3.1.1.2"
      },
      {
         "key" : "PIHOLE_INSTALL",
         "value" : "/etc/.pihole/automated install/basic-install.sh"
      },
      {
         "key" : "PHP_ENV_CONFIG",
         "value" : "/etc/lighttpd/conf-enabled/15-fastcgi-php.conf"
      },
      {
         "key" : "PHP_ERROR_LOG",
         "value" : "/var/log/lighttpd/error-pihole.log"
      },
      {
         "key" : "IPv6",
         "value" : "True"
      },
      {
         "key" : "S6_KEEP_ENV",
         "value" : "1"
      },
      {
         "key" : "S6_BEHAVIOUR_IF_STAGE2_FAILS",
         "value" : "2"
      },
      {
         "key" : "S6_CMD_WAIT_FOR_SERVICES_MAXTIME",
         "value" : "0"
      },
      {
         "key" : "FTLCONF_LOCAL_IPV4",
         "value" : "0.0.0.0"
      },
      {
         "key" : "FTL_CMD",
         "value" : "no-daemon"
      },

Pi-Hole itself also has an Inport export function, would it be better to use this?

It depends if you are setting anything via environment variables already or not. What does your exported json file look like?

I have changed the values with XXX, I do not want to publish them.
The following is in the Json:

{
   "CapAdd" : [],
   "CapDrop" : [],
   "cmd" : "",
   "cpu_priority" : 50,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enable_service_portal" : null,
   "enabled" : true,
   "entrypoint_default" : "/s6-init",
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "phpver",
         "value" : "php"
      },
      {
         "key" : "S6_OVERLAY_VERSION",
         "value" : "v2.1.0.2"
      },
      {
         "key" : "PIHOLE_INSTALL",
         "value" : "/etc/.pihole/automated install/basic-install.sh"
      },
      {
         "key" : "PHP_ENV_CONFIG",
         "value" : "/etc/lighttpd/conf-enabled/15-fastcgi-php.conf"
      },
      {
         "key" : "PHP_ERROR_LOG",
         "value" : "/var/log/lighttpd/error.log"
      },
      {
         "key" : "IPv6",
         "value" : "True"
      },
      {
         "key" : "S6_KEEP_ENV",
         "value" : "1"
      },
      {
         "key" : "S6_BEHAVIOUR_IF_STAGE2_FAILS",
         "value" : "2"
      },
      {
         "key" : "S6_CMD_WAIT_FOR_SERVICES_MAXTIME",
         "value" : "0"
      },
      {
         "key" : "FTLCONF_LOCAL_IPV4",
         "value" : "0.0.0.0"
      },
      {
         "key" : "FTL_CMD",
         "value" : "no-daemon"
      },
      {
         "key" : "DNSMASQ_USER",
         "value" : "root"
      },
      {
         "key" : "S6_LOGGING",
         "value" : "0"
      },
      {
         "key" : "FTLCONF_REPLY_ADDR4",
         "value" : "0.0.0.0"
      },
      {
         "key" : "ServerIP",
         "value" : "XXX"
      },
      {
         "key" : "DNSMASQ_LISTENING",
         "value" : "local"
      },
      {
         "key" : "WEB_PORT",
         "value" : "XXX"
      },
      {
         "key" : "WEBPASSWORD",
         "value" : "XXX"
      },
      {
         "key" : "PIHOLE_DOCKER_TAG",
         "value" : "2022.09.2"
      }
   ],
   "exporting" : false,
   "id" : "XXX",
   "image" : "pihole/pihole:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "Pi-Hole",
   "network" : [
      {
         "driver" : "host",
         "name" : "host"
      }
   ],
   "network_mode" : "host",
   "port_bindings" : [],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : true,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/pihole/pihole",
         "mount_point" : "/etc/pihole",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/pihole/dnsmasq.d",
         "mount_point" : "/etc/dnsmasq.d/",
         "type" : "rw"
      }
   ]
}