Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
"Autoupdate" feature. Update S6. Shellcheck. #81
base: master
Are you sure you want to change the base?
"Autoupdate" feature. Update S6. Shellcheck. #81
Changes from 1 commit
156169f
a09c55b
63c3c8c
b0ae80d
d504440
c5f4f70
c5da1c4
83062cd
502203f
42fdfc9
709a6de
e2734a5
c2fad2c
2cae64a
fcd1c43
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this delete the deb file after install so as to not attempt to install it every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is by design. Containers lose all of the changes within them unless they are in a volume or mount. In
autoupdate
images, these will fetch but will not delete the installer, so when the container is restarted it doesn’t need to download it again. Technically, it doesn't NEED to be cached, but it might waste a lot of bandwidth. But, just in case someone wants to actually force an install, I'll add an env var FORCE_UPDATE to ignore the cache.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you are getting at. Though, wouldn't this also install the deb if the container is just restarted? In that case, it is likely installing the same version that is already installed. Likely the only way to avoid this is to parse the version out of the deb, compare with the installed version, and skip the install if they are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, my bad. I've been using
docker run --rm
for too long - forgot that container images are in fact persisted. Ok, then we don't need to cache the installer at all, and it actually simplifies things a lot.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have docker images which have a pre-installed PMS version that do not update. The above code effectively maintains that because the
version
is the full version of the PMS installed in the image (such as1.32.4.7195-7c8f9d3b6
). This behavior must be maintained for those images.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is a good call out. I was tripped up by using the version as a TAG and having TAG also be a build-arg.
I switched things up a bit: now, you can build the image with TAG=autoupdate (this obsoletes beta/public - but you can still build the images with public/beta tags - it will behave as if it was 'autoupdate' but it will ignore the AUTO_UPDATE_CHANNEL and will be hardcoded to 'beta' or 'public').