Docker renames the image name and TAG operation

Docker renames the image name and TAG operation

When using docker images, images with both REPOSITORY and TAG set to none may appear, as shown below:

At this point, we can rename the image

# docker tag IMAGEID (image id) REPOSITORY:TAG (warehouse: tag)

Additional knowledge: Docker image rename

The docker image name was accidentally written incorrectly, for example, you wanted to name it ubuntu1604-arm-qt, but wrote it as unbuntu1604-arm-qt. How to change it back?

Rename with docker tag

docker images find image_id

The image id found is efeb4214cfc4.

haojc@ubuntu:~/docker/ubuntu1604-arm-qt$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
sword2000/unbuntu1604-arm-qt 1.0 efeb4214cfc4 13 hours ago 7.05GB
hello-world latest fce289e99eb9 7 months ago 1.84kB

Rename with docker tag <image_id>

docker tag efeb4214cfc4 ubuntu1604-arm-qt

Then delete the original image name

docker rmi sword2000/unbuntu1604-arm-qt:1.0

haojc@ubuntu:~/docker/ubuntu1604-arm-qt$ docker rmi sword2000/ubuntu1604-arm-qt:1.0
Untagged: sword2000/unbuntu1604-arm-qt:1.0
haojc@ubuntu:~/docker/ubuntu1604-arm-qt$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
sword2000/ubuntu1604-arm-qt 1.0 efeb4214cfc4 13 hours ago 7.05GB
hello-world latest fce289e99eb9 7 months ago 1.84kB

The above Docker renaming image name and TAG operation is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to use Docker to package and deploy images locally
  • How to change the domestic image source for Docker
  • How to view files in Docker image
  • How to use Docker buildx to build multi-platform images and push them to private repositories
  • Issues with using Azure Container Registry to store images

<<:  Introduction to several ways to introduce CSS in HTML

>>:  Detailed explanation of Vue development Sort component code

Recommend

Example of how to install nginx to a specified directory

Due to company requirements, two nginx servers in...

Node+express to achieve paging effect

This article shares the specific code of node+exp...

Details of function nesting and closures in js

Table of contents 1. Scope 2. Function return val...

Mac installation mysqlclient process analysis

Try installing via pip in a virtual environment: ...

Detailed explanation of MySQL sql99 syntax inner join and non-equivalent join

#Case: Query employee salary levels SELECT salary...

A few experiences in self-cultivation of artists

As the company's influence grows and its prod...

Specific use of Bootstrap5 breakpoints and containers

Table of contents 1. Bootstrap5 breakpoints 1.1 M...

Detailed explanation of ECharts mouse event processing method

An event is an action performed by the user or th...

Tutorial on installing MySQL with Docker and implementing remote connection

Pull the image docker pull mysql View the complet...

Why MySQL database avoids NULL as much as possible

Many tables in MySQL contain columns that can be ...

Complete steps to build NFS file sharing storage service in CentOS 7

Preface NFS (Network File System) means network f...

JavaScript to implement the function of changing avatar

This article shares the specific code of JavaScri...

Why Google and Facebook don't use Docker

The reason for writing this article is that I wan...

JavaScript design pattern learning adapter pattern

Table of contents Overview Code Implementation Su...