Skip to content
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

[Bug]: Docker Container Reset stays with wrong version #1443

Closed
1 task done
rmayergfx opened this issue Jun 12, 2024 · 12 comments
Closed
1 task done

[Bug]: Docker Container Reset stays with wrong version #1443

rmayergfx opened this issue Jun 12, 2024 · 12 comments

Comments

@rmayergfx
Copy link

The Problem

Stirling-PDF is running as Docker Container on Synology NAS. First setup was done by portainer script.
services:
stirling-pdf:
container_name: Stirling-PDF
image: frooodle/s-pdf:latest

i update the container by downloading the new image with a script polling all new images. stop and reset the container.
now i was wondering, why the Container was still using an old version. I found that the environmental variable
VERSION_TAG 0.2.xxx
ist never updated and still is pointig to the old installed version. If i delete this variable and reset the container, the variable will be set with the latest version number. Why is this "VERSION_TAG" not updated with the matching Version number from the actual image?

There is no VERSION_TAG set in portainer at Environment variables.

Version of Stirling-PDF

0.2.x

Last Working Version of Stirling-PDF

0.x

Page Where the Problem Occurred

No response

Docker Configuration

No response

Relevant Log Output

No response

Additional Information

Download new image from frooodle/s-pdf:latest. Stop Container, Reset Container. Start Container.
Until the VERSION_TAG is not deleted, it will stay on the already installed older Version.

Browsers Affected

Firefox, Chrome, Safari, Microsoft Edge, Other

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
@Frooodle
Copy link
Member

Cant reproduce this issue, i assume its related to how you are updating the containers, i recommend
https://github.com/containrrr/watchtower
to update all your containers

@Frooodle
Copy link
Member

I assume your version you are downloading is older version which is why VERSION_TAG does not match,
Can you prove that VERSION_TAG is old BUT the jar within docker is new? otherwise i assume both are old

@rmayergfx
Copy link
Author

i am not using watchtower, i have a simple scheduled script that is running as root to pull the latest images, for froodle i use
docker pull frooodle/s-pdf:latest
It´s working fine, i got every time a new version is downloaded an e-mail and so i can check for me if i wan´t to update the docker.
This script is also downloading other images, so i am sure it is working as expected. Also i can check the downloaded image and checksum with portainer, no problems with the images.
The only docker not working with stop, reset and start is frooodle/s-pdf:latest, i always need to remove the line "VERSION_TAG", if i don´t do this, the container stays at the old version and i don´t know why.

@Frooodle
Copy link
Member

are you able to provide script?

@Frooodle
Copy link
Member

Frooodle commented Jun 13, 2024

and also docker run/compose config

@rmayergfx
Copy link
Author

sript is just a scheduled task as root with
docker pull frooodle/s-pdf:latest

to get the latest updates/image

Installation was done with portainer and tutorial from
https://mariushosting.com/how-to-install-stirling-pdf-on-your-synology-nas/

modified with :latest tag and valid language settings, as en_US or de_DE is wrong, should be en-US oder de-DE.
also appname and user/passwd was changed to my credentials

@Frooodle
Copy link
Member

So to confirm you stop old instance

Remove old image

Run docker pull

Start container again?

There is something wrong in the process as I don't believe there is issue our end so trying to lay it out

@rmayergfx
Copy link
Author

rmayergfx commented Jun 14, 2024

The sequence is different.
Scheduler is downloading latest version, if there is a newer one, i get informed by email.
then i stop container, reset container and restart container.
this is successfull with any other docker i am running, only stirling has a "VERSION_TAG" in environmental variables that is staying on the old version until i delete.

The old image is only deleted once the upgrade has been completed without any problems so that the last status can be restored.

@Frooodle
Copy link
Member

Cant reproduce

@rmayergfx
Copy link
Author

rmayergfx commented Jun 19, 2024

Tested just a few minutes ago, as there was the old image 0.26.0 and a new image 0.26.1 is online, got an email from my system that a new image was downloaded
Status: Downloaded newer image for frooodle/s-pdf:latest so my scheduler has done the job fine.
So i looked at the container:
grafik
VERSION_TAG is 0.26.0. i stopped and reset the conainer. Still 0.26.0. Protokoll shows me
Running Stirling PDF with DOCKER_ENABLE_SECURITY=true and VERSION_TAG=0.26.0 and this is still wrong. System started with old Version. Image can´t be deleted, as it is used by the container, equal if the container is stopped or not. So i deleted again the VERSION_TAG in the Container, do a reset and the VERSION_TAG switches to 0.26.1.
So the issue is still there. i can show you this also remote if you need to see this.
grafik

Why is there always added an environment variable with the VERSION_TAG? What is it useful for and why it isn´t upgraded by the new downloaded image on start/reset.

@Frooodle
Copy link
Member

Frooodle commented Aug 3, 2024

the docker latest fat should be a workaround for you for this, the version tag is for the security jar to be downloaded as a optional addon,
docker fat does not do this and uses the exact version of the docker file and doesnt use this far

@Frooodle Frooodle closed this as completed Aug 3, 2024
@rmayergfx
Copy link
Author

Tested today with tag:Latest. Still the same, why is this Version Tag not updated when the container is reset? I didn´t understand why this version tag is not updated during the reset, only by deleting the complete variable or doing a fresh container it is automatically set.
It this is needed for security jar, maybe there is a better way to implement, e.g. not as version tag better as jar version tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants