Apt upgrade in docker container

Hi@all,

I have little experience with Docker container administration so far. As UCS installs more and more apps with Docker, I will look into it.

What I noticed. When I switch to a Docker container under UCS and call ‘apt update’ I get xx packages reported for update.

How does this behave. Does the update on the UCS host update the container or do you do this with ‘apt upgrade’ in the container itself?

with best
sven

Hey Sven,

containers are a runnable instance of an image whereas images are a read-only template containing dependencies at a certain version.
Packages inside containers are separated from the host, therefore an update of UCS does not update packages within containers. Even if this would be desired (which is not since this is a layer of isolation) containers can manage their dependencies in any fashion, so apt does only work for debian-based images.
Apps are tested with the current state of their image. This has the following implications:

  • It cannot be guaranteed that everything still works after updating packages within the container
  • A reinit of the app downgrades everything to the state contained in the image without any downgrade procedure

If you want to you can update your containers in this fashion, but this breaks with Docker best practices and I would not recommend doing so.

Best regards
Jan-Luca