appsody / stacks

Appsody application stacks. This repo will be archived soon.
https://appsody.dev
Apache License 2.0
90 stars 120 forks source link

kitura: Update to not upgrade packages in base image #718

Closed groeges closed 4 years ago

groeges commented 4 years ago

Signed-off-by: Steven Groeger groeges@uk.ibm.com

Checklist:

Modifying an existing stack:

Contributing a new stack:

Related Issues:

ianpartridge commented 4 years ago

Sorry, could you explain the rationale for this? :)

groeges commented 4 years ago

@ianpartridge We have had issue recently where the application dockerfile build failed due to updates being made in some packages that were updated since the stack image had been tested / created.

As such, we have been removing all the places in the dockerfile where an apt-get upgrade is being done in order to keep just the package versions available in the base stack.

Looking at the changes I may have misread "update" as "upgrade" and removed those lines, so this PR might not be valid, but does just doing an "apt-get update && apt-get clean" actually do anything? If not, does it need to be done?

If "apt-get update && apt-get clean" does something necessary and doesn't update package versions on the system then we can probably close this PR (as it will be unnecessary)

ianpartridge commented 4 years ago

Thanks @groeges.

"apt-get update" just updates the list of packages and their versions from the package database, it does not actually upgrade any packages to newer versions. "apt-get upgrade" actually upgrades the packages. As such, the current message of "Finished installing dependencies" is incorrect and misleading.

So, I think we should merge this PR. If we ever want to explicitly upgrade packages in the future we can re-add the apt-get update at that time.

N.B. It is important to run apt-get update before apt-get upgrade so that you are upgrading to the latest version of the package, not whatever the latest version in the local package index was.