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

MySQL index failure principle

Table of contents 1. Reasons for index failure 2....

v-html rendering component problem

Since I have parsed HTML before, I want to use Vu...

Detailed explanation of simple snow effect example using JS

Table of contents Preface Main implementation cod...

Using jQuery to implement the carousel effect

This article shares the specific code for impleme...

Detailed steps to install xml extension in php under linux

Installing XML extension in PHP Linux 1. Enter th...

MySQL import and export backup details

Table of contents 1. Detailed explanation of MySQ...

MySQL installation diagram summary

MySQL 5.5 installation and configuration method g...

Windows Server 2019 IIS10.0+PHP(FastCGI)+MySQL Environment Construction Tutorial

Preparation 1. Environmental Description: Operati...

Textarea tag in HTML

<textarea></textarea> is used to crea...

Mysql Chinese sorting rules description

When using MySQL, we often sort and query a field...

Installation tutorial of the latest stable version of MySQL 5.7.17 under Linux

Install the latest stable version of MySQL on Lin...

Vue front-end development auxiliary function state management detailed example

Table of contents mapState mapGetters mapMutation...