New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read DOCKER_VERSION from version file instead of env variable #2356
Conversation
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-18-1-web-v5-15-1-and-core-v5-12-2-released/58022/1 |
For a long time I had the issue that when updating the pi-hole image using Portainer, it doesn't change any of the existing environment variabeles, causing the DOCKER_VERSION displayed to be incorrect. It always show the tag of the first version that was installed, not the current version. I really hoped this pull request would fix this problem, but it did not. So does the file just copies the contents of the environment variabele? Isn't possible to fill the file in another way, so that it ignores the environment variabele? Or can I simply delete the variabele to fix this? |
The previous container should be destroyed before using a new image. That said, we are already changing the code (to ignore the var) to avoid confusion when this variable is not removed. |
Yes, but this is unfortunaly not how Portainer works when it pulls a new image. Also it would mean that I loose all container modifications (like the network, custom IP address, etc). The only alternative would to create a compose file with these modifications, instead of using the Portainer GUI to set them.
I just removed the variabele, and v5.12.2 is showing the correct docker tag now I removed it. So my issue is solved, thanks! |
Not exaclty. If you want to update the image and keep your config, you can use the Or you can use Portainer |
That is exactly how I always did it: by using Duplicate/Edit. But as you were talking about destroying the container first, I thought you ment something else. Anyhow, it works now. |
You should destroy it. If you are unable to do it, you can use the method shown above.
But did you remove all variables like I did on the video? |
What does this PR aim to accomplish?:
With pi-hole/pi-hole#4913 we store the docker tag (if available) as
DOCKER_VERSION
in theversions
file. This PR makes PHP readingdocker_current
from that file instead of using the passed env variable. This makes this assignment work in the same way we assign all the otherversion
variables.By submitting this pull request, I confirm the following:
git rebase
)