I have a host ubuntu 20.04 running my software on docker with a container derivated from ubuntu 18.04. I would like to use ubuntu 20.04 for several reasons (like the better software on 20.04). If I run do-release-upgrade on the container terminal I receive the following: "do-release-upgrade Checking for a new Ubuntu release You have not rebooted after updating a package which requires a reboot. Please reboot before upgrading." Rebooting the container or rebooting the host machine does not solve the problem.
Docker doesn't recommend running an apt-get upgrade and dist-upgrade on a docker image as many of the "essential" packages from the partent image cannot upgrade inside an unprevileged container. take a look at the Docker best practices
That is not good design to have docker or any lib update after logging into the container. As mentioned by Andrea Giaime Bodei , you need to update the base image in the Dockerfile and rebuild the image. The docker images are immutable.
# Download base image ubuntu 20.04
# LABEL about the custom image
LABEL maintainer="[email protected]"
LABEL description="This is custom Docker Image for \