Wednesday, May 12, 2021

Docker rename a "none" image

If name of a docker image is imported as <none>, you can rename it quite easily.

Run command in the host.

docker tag imageid imagename

Where imageid is id of the image which is showing <none> and image name is the new name of the image which you want to replace with <none>.

You can see the solution in the following video.



Docker Error - debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module)

Docker Error :

debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module)
debconf: delaying package configuration, since apt-utils is not installed.


Solution :

Run commands in the ubuntu container where you are getting the error

apt install apt-utils
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

Docker Error - Error initializing network controller: could not delete the default bridge network

Docker service is not starting because of following error.

Starting Docker Application Container Engine...
level=info msg="[graphdriver] using prior storage driver \"aufs\""
level=info msg="Graph migration to content-addressability took 0.00 seconds"
level=info msg="Firewalld running: false"
level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints"
docker.service: Main process exited, code=exited, status=1/FAILURE
Failed to start Docker Application Container Engine.
docker.service: Unit entered failed state.
docker.service: Failed with result 'exit-code'.


Solution :
Remove /var/lib/docker/network folder.


I moved the folder to home dir and restarted docker as I thought if something is broken, I can replace it again to its original place but nothing was broken, I did not need the folder again and the error was gone. I could restart docker successfully.