xxxxxxxxxx
You can rename your docker image by docker tag command.
Use the below given command to do that.
$ docker tag OldName:tag NewName:tag
Or another way to rename docker container
To rename docker container, use the rename sub-command as shown,
in the following example, we renaming the container discourse_app
to a new name disc_app.
$ sudo docker rename discourse_app disc_app
After renaming a containers, confirm that it is now using the new name.
$ sudo docker ps