I'm fairly new to Docker and run several containers on my NAS. Normally I redeploy a service with the option to pull the newest image, and the container updates successfully. However, Immich reports that it pulled and recreated the containers, but the running version has not changed.
The relevant image entries use `${IMMICH_VERSION:-release}` for both the Immich server and machine-learning containers. The compose file also loads a `.env` file, while Redis and PostgreSQL use fixed image tags and digests. What could be preventing Immich from updating, and what is the correct way to make Compose pull and recreate the desired version?
2 Answers
You can add `pull_policy: always` under the Immich services, or explicitly run `docker compose pull` before `docker compose up -d`. That makes the image check more obvious, but it will not override an old value of `IMMICH_VERSION` in `.env`.
Check the `.env` file in the same project directory first. `IMMICH_VERSION` is controlling both Immich image tags, so if it is set to an older version, Compose will keep using that version even though the deployment says it pulled successfully. Change it to the release you want, then pull and recreate the services. Also remember that `env_file` supplies variables to containers; Compose’s `${...}` substitution is generally read from the project `.env` file, the shell environment, or an explicitly supplied environment file.

That was the problem. The web interface was not displaying the `.env` file, so I had forgotten that it specified the Immich version. After changing it, the update worked; I just needed to account for the release’s breaking changes.