4-Docker命令之docker tag

1.docker tag介绍

docker tag命令是用来给docker镜像打标签

2.docker tag用法

docker tag SOURCE_IMAGE:TAG TARGET_IMAGE:TAG

复制代码
[root@centos79 ~]# docker tag --help

Usage:  docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

Aliases:
  docker image tag, docker tag
[root@centos79 ~]# 

3.实例

3.1.docker镜像打标签

命令:

docker tag nginx:latest nginx:1.0

复制代码
[root@centos79 ~]# docker images | grep nginx
nginx                                latest        605c77e624dd   23 months ago   141MB
[root@centos79 ~]# docker tag nginx:latest nginx:1.0
[root@centos79 ~]# docker images | grep nginx
nginx                                1.0           605c77e624dd   23 months ago   141MB
nginx                                latest        605c77e624dd   23 months ago   141MB
[root@centos79 ~]# 
相关推荐
bigbig_ben2 小时前
yearning安装docker
运维·docker·容器
IT小小猪11 小时前
从零搭建K8s 集群
云原生·容器·kubernetes
吴声子夜歌12 小时前
Docker入门与实战——热门镜像介绍
运维·docker·容器
方便面不加香菜12 小时前
容器虚拟化基础--CGroups资源控制
运维·docker·容器
BioRunYiXue13 小时前
使用docker分析高通量测序数据
java·数据库·人工智能·spring cloud·docker·tomcat·html
吴声子夜歌15 小时前
Docker入门与实战——Docker命令查询
docker·容器
handonch15 小时前
金仓 KingbaseES 时区问题根治指南:从「总是差 8 小时」到全链路统一
linux·docker·postgresql·信创
吴声子夜歌17 小时前
Docker入门与实战——常见问题总结
运维·docker·容器
丨晨 丨17 小时前
K8s控制器天团图鉴-五大控制器整活
云原生·容器·kubernetes
马立杰18 小时前
Docker Build 编译补丁版 PHP7.4 FPM 容器镜像教程(CVE-2026-109618 CVE-2026-109619)
运维·docker·容器·php